feast
feast copied to clipboard
[Test restructure 5] Refactor root conftest.py — move fixtures, remove marker filtering
What
The root tests/conftest.py currently does too much. Refactor it to match the new structure.
Changes
Move to universal/conftest.py:
environmentfixture andpytest_generate_testsparametrization logicuniversal_data_sourcesfixture (construct_universal_test_data)e2e_data_sourcesfixturefeature_server_endpointfixturefeature_store_for_online_retrievalfixturevectordb_environmentfixturefake_ingest_data,fake_document_data,fake_image_data
Delete from root:
pytest_collection_modifyitemsmarker filtering logic (the entire function)--integrationCLI option frompytest_addoption- Related marker registration that only served filtering
Keep in root:
simple_dataset_1,simple_dataset_2(used across tiers)temp_dir,server_port(used across tiers)- Marker registrations still needed for pytest
--strict-markers --benchmarkoption and benchmark filtering (if still needed)
Validation
pytest tests/unitruns without collecting any universal or integration testspytest tests/universalstill discovers and parametrizes theenvironmentfixture correctly- No fixture resolution errors across any tier
Hi! I noticed yashghatol's plan from June included this sub-issue (#6053) along with #6051, #6052, and #6054, but no PR ever materialized for it. I went ahead and opened a PR: https://github.com/feast-dev/feast/pull/6804
While validating the change (per this issue's own "Validation" checklist), I found that removing pytest_collection_modifyitems exposed two mis-tiered test files that were previously silently protected by the marker-filtering logic:
tests/unit/infra/compute_engines/flink/test_flink_compute_engine.pyhad one@pytest.mark.integrationtest hiding inunit/. Moved the whole file totests/component/flink/, matching the existing precedent from #6050.tests/unit/test_rest_error_decorator.py— this one's actually already flagged in #6052's own investigation table as needing this fix. Moved it totests/universal/per that suggestion.
Happy to adjust anything or split these into separate PRs if that's preferred — let me know.