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.py → tests/unit/optim/test_optimizer.py |
Content is unit tests; integration/ subdir shouldn't exist under unit/ |
tests/unit/models/auto/test_integration.py → test_automodel.py |
File is 100% mocked, name is misleading |
tests/integration/test_module_build_e2e.py → test_module_build.py |
Already in integration dir, _e2e suffix redundant |
tests/integration/test_quantization_e2e.py → test_quantization.py |
Same |
🤖 Generated with Claude Code
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 totests/integration/ortests/e2e/so thatpytest tests/unit/runs fast and offline.Tests to move
A. To
tests/integration/(require network / model downloads)tests/unit/loader/test_load_hf_model.py@pytest.mark.slowclassestests/unit/config/test_build.py@pytest.mark.slowclassestests/unit/loader/test_detect_task_and_class.py@pytest.mark.slowclassestests/unit/loader/test_hf_model_class_mapping.pyTestHFModelClassMappingE2Etests/unit/datasets/test_object_detection.pytests/unit/optim/pipes/test_pipe_fusion.py@pytest.mark.slowmethodB. To
tests/e2e/(require specific hardware)tests/unit/session/test_winml_session.pyTestWinMLSessionEPSpecific+test_winml_registry_ep_discoverytests/unit/session/test_ep_monitor.pyTestHWMonitorIntegrationC. Naming / structure fixes
tests/unit/optim/integration/test_optimizer.py→tests/unit/optim/test_optimizer.pyintegration/subdir shouldn't exist underunit/tests/unit/models/auto/test_integration.py→test_automodel.pytests/integration/test_module_build_e2e.py→test_module_build.py_e2esuffix redundanttests/integration/test_quantization_e2e.py→test_quantization.py🤖 Generated with Claude Code