Closed gilesknap closed 1 month ago
@GDYendell this PR is on top of the monster you have been reviewing for me.
I have made the Globals and the test fixtures neater I think.
If you have time perhaps you could see what you think. But essentially I think we are ready to merge the whole thing.
Thanks for you very useful input on this.
I think we want really clear docstrings for the globals. Possibly we could pull some of the definitions from the EPICS docs so that we are using terms that other sites will recognise?
The tests don't pass for me:
ERROR tests/test_cli.py::test_build_runtime_motorSim - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_build_runtime_motorSim0/epics/runtime' ERROR tests/test_cli.py::test_build_utils_features - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_build_utils_features0/epics/runtime' ERROR tests/test_cli.py::test_ipac - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_ipac0/epics/runtime' ERROR tests/test_cli.py::test_gauges - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_gauges0/epics/runtime' ERROR tests/test_cli.py::test_quadem - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_quadem0/epics/runtime' ERROR tests/test_error.py::test_counter_reuse - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_counter_reuse0/epics/runtime' ERROR tests/test_error.py::test_counter_overuse - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_counter_overuse0/epics/runtime' ERROR tests/test_error.py::test_bad_db - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_bad_db0/epics/runtime' ERROR tests/test_support.py::test_check_dependencies - FileExistsError: [Errno 17] File exists: '/tmp/pytest-of-mef65357/pytest-3/test_check_dependencies0/epics/runtime'
Holy bat droppings! I'm seeing the same issue. It passed for me yesterday and it passed in CI.
Oh well --- investigating.
Created a new pytest fixture
epics_root
which creates a new partly populated epics folder in tmp and patches globals to point at it.This way most tests just need to reference that fixture and all is much tidier. honest.