Skip to content

[Data] Create unit test directory for fast, isolated tests#58445

Merged
bveeramani merged 3 commits intomasterfrom
data-unit-tests
Nov 7, 2025
Merged

[Data] Create unit test directory for fast, isolated tests#58445
bveeramani merged 3 commits intomasterfrom
data-unit-tests

Conversation

@bveeramani
Copy link
Member

Summary

Creates a dedicated tests/unit/ directory for unit tests that don't require Ray runtime or external dependencies.

Changes

  • Created tests/unit/ directory structure
  • Moved 13 pure unit tests to tests/unit/
  • Added conftest.py with fixtures to prevent ray.init() and time.sleep()
  • Added README.md documenting unit test requirements
  • Updated BUILD.bazel to run unit tests with "small" size tag

Test Files Moved

  1. test_arrow_type_conversion.py
  2. test_block.py
  3. test_block_boundaries.py
  4. test_data_batch_conversion.py
  5. test_datatype.py
  6. test_deduping_schema.py
  7. test_expression_evaluator.py
  8. test_expressions.py
  9. test_filename_provider.py
  10. test_logical_plan.py
  11. test_object_extension.py
  12. test_path_util.py
  13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and deterministic (no time.sleep or randomness).

- Create tests/unit/ directory for tests without Ray runtime dependencies
- Move 13 pure unit tests to tests/unit/
- Add conftest.py to prevent ray.init() and time.sleep()
- Add README.md explaining unit test requirements
- Update BUILD.bazel to run unit tests with "small" size tag

Unit tests are fast, isolated, and deterministic. They don't require:
- Ray distributed runtime initialization
- Time-based delays (time.sleep)
- External services or file I/O

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
@bveeramani bveeramani requested a review from a team as a code owner November 7, 2025 04:50
@bveeramani bveeramani changed the title [data] Create unit test directory for fast, isolated tests [Data] Create unit test directory for fast, isolated tests Nov 7, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a dedicated directory for unit tests, which is a great step towards improving test organization and execution speed. The approach of using conftest.py to enforce isolation rules is sound. The changes to the build system and the addition of a README.md are well-executed. My review includes one correction for the conftest.py to ensure it behaves as expected in all cases.

@ray-gardener ray-gardener bot added docs An issue or change related to documentation data Ray Data-related issues labels Nov 7, 2025
Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Copy link
Contributor

@raulchen raulchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

Copy link
Contributor

@iamjustinhsu iamjustinhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AWESOME!!

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
@bveeramani bveeramani enabled auto-merge (squash) November 7, 2025 21:45
@github-actions github-actions bot added the go add ONLY when ready to merge, run all tests label Nov 7, 2025
@bveeramani bveeramani merged commit 85a714c into master Nov 7, 2025
6 of 8 checks passed
@bveeramani bveeramani deleted the data-unit-tests branch November 7, 2025 23:01
YoussefEssDS pushed a commit to YoussefEssDS/ray that referenced this pull request Nov 8, 2025
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
ykdojo pushed a commit to ykdojo/ray that referenced this pull request Nov 27, 2025
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: YK <1811651+ykdojo@users.noreply.github.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
…ct#58445)

## Summary
Creates a dedicated `tests/unit/` directory for unit tests that don't
require Ray runtime or external dependencies.

## Changes
- Created `tests/unit/` directory structure
- Moved 13 pure unit tests to `tests/unit/`
- Added `conftest.py` with fixtures to prevent `ray.init()` and
`time.sleep()`
- Added `README.md` documenting unit test requirements
- Updated `BUILD.bazel` to run unit tests with "small" size tag

## Test Files Moved
1. test_arrow_type_conversion.py
2. test_block.py
3. test_block_boundaries.py
4. test_data_batch_conversion.py
5. test_datatype.py
6. test_deduping_schema.py
7. test_expression_evaluator.py
8. test_expressions.py
9. test_filename_provider.py
10. test_logical_plan.py
11. test_object_extension.py
12. test_path_util.py
13. test_ruleset.py

These tests are fast (<1s each), isolated (no Ray runtime), and
deterministic (no time.sleep or randomness).

---------

Signed-off-by: Balaji Veeramani <bveeramani@berkeley.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: peterxcli <peterxcli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data Ray Data-related issues docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants