Skip to content

Move misplaced integration/e2e tests out of tests/unit/ #51

@timenick

Description

@timenick

Summary

Several test classes in tests/unit/ are actually integration or e2e tests — they download models from HuggingFace, require specific hardware (NPU/GPU), or run full pipelines. These should be moved to tests/integration/ or tests/e2e/ so that pytest tests/unit/ runs fast and offline.

Tests to move

A. To tests/integration/ (require network / model downloads)

Source file Classes Downloads
tests/unit/loader/test_load_hf_model.py 4 @pytest.mark.slow classes resnet-18, clip, bert-tiny
tests/unit/config/test_build.py 3 @pytest.mark.slow classes bert-tiny, resnet-18
tests/unit/loader/test_detect_task_and_class.py 2 @pytest.mark.slow classes blip, resnet-18, convnext
tests/unit/loader/test_hf_model_class_mapping.py TestHFModelClassMappingE2E clip, bert-tiny
tests/unit/datasets/test_object_detection.py Entire file detr-resnet-50, mini-imagenet
tests/unit/optim/pipes/test_pipe_fusion.py @pytest.mark.slow method model architecture configs

B. To tests/e2e/ (require specific hardware)

Source file Classes Dependency
tests/unit/session/test_winml_session.py TestWinMLSessionEPSpecific + test_winml_registry_ep_discovery QNN/CUDA/DML/etc. EPs
tests/unit/session/test_ep_monitor.py TestHWMonitorIntegration Real NPU hardware

C. Naming / structure fixes

Action Reason
tests/unit/optim/integration/test_optimizer.pytests/unit/optim/test_optimizer.py Content is unit tests; integration/ subdir shouldn't exist under unit/
tests/unit/models/auto/test_integration.pytest_automodel.py File is 100% mocked, name is misleading
tests/integration/test_module_build_e2e.pytest_module_build.py Already in integration dir, _e2e suffix redundant
tests/integration/test_quantization_e2e.pytest_quantization.py Same

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions