Problem
The PR workflow runs make unittest, but the target executes only:
pytest tests/test_dataset.py::TestDataSet::test_download_small
This test downloads data from S3 and Aliyun OSS, so it is an online E2E/integration test—not a unit test.
As a result:
- PR CI does not run the pure local unit-test suite.
- CI depends on external network and storage availability.
- New local tests can pass manually but remain unprotected by CI.
- Failures do not clearly distinguish code regressions from external-service failures.
The repository already defines an integration pytest marker, but classification is incomplete. Running:
pytest --collect-only -m "not integration" tests
still collects service-dependent tests and fails on missing optional SDKs such as Chroma, Pinecone, Turbopuffer, and MySQL.
Some files also mix both test types, such as test_milvus.py, test_pgvector.py, and test_dataset.py.
Proposed approach
Separate tests into two explicit categories:
-
Pure local unit tests
- No network access.
- No live database or external service.
- No credentials or large dataset downloads.
- Deterministic and fast.
- Run on every pull request.
-
Online E2E tests
- Require dataset downloads, a running database, cloud credentials, containers, or optional provider SDKs.
- Run in dedicated jobs or workflows with their prerequisites documented.
- Can be scheduled, manually triggered, or enabled for selected PRs.
Prefer separate directories so unit-test collection does not import E2E-only dependencies:
tests/
├── unit/
└── e2e/
Add explicit Make targets:
unit-test:
PYTHONPATH=`pwd` python3 -m pytest tests/unit
e2e-test:
PYTHONPATH=`pwd` python3 -m pytest tests/e2e -svv
The existing unittest target can temporarily alias unit-test for compatibility.
Acceptance criteria
Problem
The PR workflow runs
make unittest, but the target executes only:This test downloads data from S3 and Aliyun OSS, so it is an online E2E/integration test—not a unit test.
As a result:
The repository already defines an
integrationpytest marker, but classification is incomplete. Running:pytest --collect-only -m "not integration" testsstill collects service-dependent tests and fails on missing optional SDKs such as Chroma, Pinecone, Turbopuffer, and MySQL.
Some files also mix both test types, such as
test_milvus.py,test_pgvector.py, andtest_dataset.py.Proposed approach
Separate tests into two explicit categories:
Pure local unit tests
Online E2E tests
Prefer separate directories so unit-test collection does not import E2E-only dependencies:
Add explicit Make targets:
The existing
unittesttarget can temporarily aliasunit-testfor compatibility.Acceptance criteria
make unit-testpasses with onlypip install -e ".[test]".test_download_smallis moved to the E2E category.