DiamondLightSource / DiamondLightSource/httomo

Some UI layer tests take longer than expected to run

Open
#593 0 comments 0 reactions 0 assignees View on GitHub
testing
Dominant language
Python
Stars
10
Forks
5
Avg merge
5d 17h
Merged PRs (30d)
1

Description

The top 5 stick out, in comparison to the rest of tests which take 0.01s or less:
```
(base) root@57b6bd69e7ba:/httomo# pytest --durations=0 tests/test_ui_layer.py
========================================== test session starts ===========================================
platform linux -- Python 3.12.8, pytest-8.3.4, pluggy-1.5.0 -- /opt/conda/bin/python3.12
cachedir: .pytest_cache
rootdir: /httomo
configfile: pyproject.toml
plugins: xdist-3.6.1, mpi-0.6, mock-3.14.0, cov-6.0.0
collected 20 items

tests/test_ui_layer.py::test_can_read_cpu_pipeline PASSED [ 5%]
tests/test_ui_layer.py::test_can_read_gpu_pipeline PASSED [ 10%]
tests/test_ui_layer.py::test_uilayer_fails_with_nonexistant_file[does_not_exist.yaml] PASSED [ 15%]
tests/test_ui_layer.py::test_pipeline_build_no_loader PASSED [ 20%]
tests/test_ui_layer.py::test_pipeline_build_duplicate_id PASSED [ 25%]
tests/test_ui_layer.py::test_pipeline_build_cpu_pipeline PASSED [ 30%]
tests/test_ui_layer.py::test_build_pipeline_from_json PASSED [ 35%]
tests/test_ui_layer.py::test_build_pipeline_with_param_sweeps[manual] PASSED [ 40%]
tests/test_ui_layer.py::test_build_pipeline_with_param_sweeps[range] PASSED [ 45%]
tests/test_ui_layer.py::test_raise_error_if_pipeline_is_yaml_string PASSED [ 50%]
tests/test_ui_layer.py::test_raise_error_if_pipeline_is_json_file PASSED [ 55%]
tests/test_ui_layer.py::test_update_side_output_references_invalid[no_ref] PASSED [ 60%]
tests/test_ui_layer.py::test_update_side_output_references_invalid[as ${{mixed_with_other}}] PASSED [ 65%]
tests/test_ui_layer.py::test_update_side_output_references_invalid[${{mixed_with_other}} asd] PASSED [ 70%]
tests/test_ui_layer.py::test_update_side_output_references_invalid[${{}}] PASSED [ 75%]
tests/test_ui_layer.py::test_update_side_output_references_invalid[${{with spaces}}] PASSED [ 80%]
tests/test_ui_layer.py::test_update_side_output_references_invalid[${{inV-1%^&valid_chars}}] PASSED [ 85%]
tests/test_ui_layer.py::test_update_side_output_references_normal PASSED [ 90%]
tests/test_ui_layer.py::test_update_side_output_references_nosidestr PASSED [ 95%]
tests/test_ui_layer.py::test_update_side_output_references_notfound PASSED [100%]

=========================================== slowest durations ============================================
1.02s call tests/test_ui_layer.py::test_pipeline_build_cpu_pipeline
0.79s call tests/test_ui_layer.py::test_pipeline_build_duplicate_id
0.36s call tests/test_ui_layer.py::test_build_pipeline_with_param_sweeps[range]
0.32s call tests/test_ui_layer.py::test_build_pipeline_with_param_sweeps[manual]
0.23s call tests/test_ui_layer.py::test_build_pipeline_from_json
0.02s call tests/test_ui_layer.py::test_can_read_cpu_pipeline
0.01s setup tests/test_ui_layer.py::test_raise_error_if_pipeline_is_json_file
0.01s call tests/test_ui_layer.py::test_pipeline_build_no_loader
0.01s call tests/test_ui_layer.py::test_can_read_gpu_pipeline
0.01s call tests/test_ui_layer.py::test_update_side_output_references_notfound
0.01s call tests/test_ui_layer.py::test_update_side_output_references_normal

(49 durations < 0.005s hidden. Use -vv to show these durations.)
=========================================== 20 passed in 2.91s ===========================================
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.