Split test suite into unit/ and integration/ subdirectories#615
Split test suite into unit/ and integration/ subdirectories#615jishanahmed-shaikh wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Thanks @jishanahmed-shaikh, direction is right. A few things to address before merge.
Top-level:
uv.lock(+5079 lines) is unrelated to the test split, please remove and open a separate PR if committing the lockfile is desired.- Delete
tests/unit/conftest.pyentirely.ensure_rank_zeroandWANDB_MODEare already in the roottests/conftest.pyand pytest picks up parent conftests automatically. --tb=shortis passed to the unit run but not the integration run, please align.- Branch is
CONFLICTINGwithmain, needs a rebase.
Inline comments below.
- Remove uv.lock (unrelated to this PR) - Delete tests/unit/conftest.py (root conftest covers WANDB_MODE and ensure_rank_zero; pytest picks up parent conftests automatically) - Strip tests/integration/conftest.py to S3/datastore code only, removing duplicated WANDB_MODE and ensure_rank_zero blocks - Move DATASTORES.setdefault registration to root tests/conftest.py so the registry is touched in one place - Remove DATASTORES mutation from tests/unit/test_clamping.py - Fix stale comment in test_clamping.py (drop hardcoded feature count) - Split CI into three steps: unit tests, integration tests, doctests; align --tb=short across both test steps; run doctests against neural_lam/ explicitly so they are not lost - Drop unused 'integration' pytest marker from pyproject.toml - Fix CHANGELOG entry to link PR mllam#615 instead of issue mllam#599 - Truncate tests/unit/__init__.py and tests/integration/__init__.py to 0 bytes (match existing tests/__init__.py convention) Co-authored-by: Kiro <kiro@amazon.com>
4d7f2bf to
6112087
Compare
- Move test_imports, test_config, test_cli, test_time_slicing, test_train_model_warnings into tests/unit/ - Refactor test_clamping to use DummyDatastore instead of MDPDatastore and move to tests/unit/ - Move test_datastores, test_graph_creation, test_training, test_datasets, test_plotting, test_plot_graph into tests/integration/ - Add tests/integration/conftest.py with S3 fixture and init_datastore_example; strip tests/conftest.py to shared env setup - Add tests/unit/conftest.py with no S3 dependencies - Register pytest marker 'integration' and testpaths in pyproject.toml - Split CI pytest step into unit and integration runs
- Remove uv.lock (unrelated to this PR) - Delete tests/unit/conftest.py (root conftest covers WANDB_MODE and ensure_rank_zero; pytest picks up parent conftests automatically) - Strip tests/integration/conftest.py to S3/datastore code only, removing duplicated WANDB_MODE and ensure_rank_zero blocks - Move DATASTORES.setdefault registration to root tests/conftest.py so the registry is touched in one place - Remove DATASTORES mutation from tests/unit/test_clamping.py - Fix stale comment in test_clamping.py (drop hardcoded feature count) - Split CI into three steps: unit tests, integration tests, doctests; align --tb=short across both test steps; run doctests against neural_lam/ explicitly so they are not lost - Drop unused 'integration' pytest marker from pyproject.toml - Fix CHANGELOG entry to link PR mllam#615 instead of issue mllam#599 - Truncate tests/unit/__init__.py and tests/integration/__init__.py to 0 bytes (match existing tests/__init__.py convention)
6112087 to
4a66af6
Compare
|
Hi @jishanahmed-shaikh, are you still interested in driving this one? It would need a rebase, the inline comments above addressed, and the ~7 new test files added to I'd also want to discuss the unit/integration split as a convention at a dev meeting before enforcing it, so even with a rebase ready the PR might sit a bit. Let me know if you still have bandwidth, otherwise happy to close until someone picks it up. Thanks for the proposal either way! |
Hi, thanks for checking in. I'm still interested in working on this, but due to other commitments I wouldn't be able to dedicate the necessary bandwidth for another 2 weeks. Realistically, I'd want enough time to properly rebase, address the review comments, and go through the newer test files and classification work. If that timeline works for the project, I'd be happy to pick it back up then. Otherwise, I completely understand if you'd prefer to close the PR for now and have someone else take it on. Thanks again for reaching out, and I appreciate the flexibility either way. |
Describe your changes
Split the flat tests/ directory into tests/unit/ and tests/integration/ to make the distinction between fast isolated tests and slow S3-dependent tests visible in the file tree.
Issue Link
closes #599
Type of change
Checklist before requesting a review
Checklist for reviewers
Author checklist after completed review