tests restructure
@@ -85,14 +85,40 @@ outputs:
source_files:
- tests
commands:
+ {% set failing_tests = ["test_imcrop",
+ "test_tensor2imgs",
+ "test_imwrite",
+ "test_imfrombytes",
+ "test_imread",
+ "test_timer_run",
+ "test_timer_context",
+ "test_track_progress_list",
+ "test_track_progress_iterator",
+ "test_track_iter_progress",
+ "test_track_enum_progress",
+ "test_track_parallel_progress_list",
+ "test_track_parallel_progress_iterator"
+ ] %}
+ {% set slow_tests = ["test_eval_hook",
+ "test_start_param",
+ "test_flat_cosine_runner_hook",
+ "test_momentum_runner_hook",
+ "test_step_runner_hook",
+ "test_adjust_sharpness",
+ "test_adjust_contrast",
+ "test_adjust_brightness",
+ "test_gradient_cumulative_optimizer_hook",
+ "test_auto_contrast"] %}
+ {% set ignored_files=["./tests/test_ops/test_onnx.py",
+ "./tests/test_ops/test_tensorrt.py",
+ "./tests/test_ops/test_tensorrt_preprocess.py"]}
# ignored tests:
# test_onnx.py,test_tensorrt.py,test_tensorrt_preprocess.py - mccv currently compiled without onnx runtime
# test_geometric.py:test_imcrop - depending on what backend opencv uses it produces diff results (lipjpeg vs libturbojpeg)
# test_io.py - tries to import libturbojpeg that we don't install (conflicts with opencv that uses libjpeg)
- - python3 -m pytest ./tests/ --ignore=./tests/test_ops/test_onnx.py --ignore=./tests/test_ops/test_tensorrt.py --ignore=./tests/test_ops/test_tensorrt_preprocess.py --ignore=./tests/test_image/test_geometric.py --ignore=./tests/test_image/test_io.py # [linux]
# test_progressbar.py, test_timer.py - on OSX sleep(1) takes 1.1sec, so all related tests fail
# test_image_misc.py::test_tensor2imgs - need to investigate 2/75 mismatch
- - python3 -m pytest --deselect=tests/test_image/test_image_misc.py::test_tensor2imgs --ignore=./tests/test_utils/test_progressbar.py --ignore=./tests/test_utils/test_timer.py --ignore=./tests/test_ops/test_onnx.py --ignore=./tests/test_ops/test_tensorrt.py --ignore=./tests/test_ops/test_tensorrt_preprocess.py --ignore=./tests/test_image/test_geometric.py --ignore=./tests/test_image/test_io.py # [osx]
+ - python3 -m pytest ./tests/ --ignore={{ ignored_files|join(' --ignore=') }} -k "not {{ (failing_tests + slow_tests)|join(' or ') }}"
- python3 -c "import mmcv; print(mmcv.__version__)"
