Pytest issues when too many apps running
When running pytest --cov, the test returns many errors, but only when too many apps are running in the background. When I close all apps on my mac (except Google Chrome), the test runs fine.
Below is a copy of my chat with Victor, with more details
=============================
Adam Lawrence 1 hour ago I just realised I was running pytest earlier and not pytest --cov
Adam Lawrence 1 hour ago When I run pytest --cov I still get some errors
Adam Lawrence 1 hour ago ======================================================= short test summary info ======================================================= FAILED tests/utilities/test_experiment_helpers.py::test_create_plotmon_from_historical - pyqtgraph.multiprocess.remoteproxy.NoResult... ERROR tests/visualization/test_instrument_monitor.py::TestInstrumentMonitor::test_attributes_created_during_init - pyqtgraph.multipr... ERROR tests/visualization/test_instrument_monitor.py::TestInstrumentMonitor::test_update - pyqtgraph.multiprocess.remoteproxy.NoResu... ERROR tests/visualization/test_instrument_monitor.py::TestInstrumentMonitor::test_setGeometry - pyqtgraph.multiprocess.remoteproxy.N... ERROR tests/visualization/test_instrument_monitor.py::TestQcSnapshotWidget::test_buildTreeSnapshot - pyqtgraph.multiprocess.remotepr... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_attributes_created_during_init - pyqtgraph.multiprocess.r... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_validator_accepts_TUID_objects - pyqtgraph.multiprocess.r... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_basic_1D_plot - pyqtgraph.multiprocess.remoteproxy.NoResu... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_basic_2D_plot - pyqtgraph.multiprocess.remoteproxy.NoResu... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_persistence - pyqtgraph.multiprocess.remoteproxy.NoResult... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_setGeometry - pyqtgraph.multiprocess.remoteproxy.NoResult... ERROR tests/visualization/test_pyqt_plotmon.py::TestPlotMonitor_pyqt::test_changed_datadir_main_process - pyqtgraph.multiprocess.rem... ================================== 1 failed, 76 passed, 83 warnings, 11 errors in 317.17s (0:05:17) ===================================
Adam Lawrence 1 hour ago Any ideas what this could be? Is it a related issue?
Victor Negîrneac 1 hour ago unfortunately not, it has to do with multiprocessing packages that we rely upon, it is fine to run pytest only for now
Victor Negîrneac 1 hour ago do you have a new mac with the Apple processor btw?
Adam Lawrence 1 hour ago No, quite an old mac (2012 model MacBook Pro)
Adam Lawrence 1 hour ago Incidentally, I had no problems running pytest --cov on quantify-scheduler, I only got the errors on core
Victor Negîrneac 1 hour ago can you try closing almost all the apps that you have opened, like fully cmd+q and running the tests again? I have been having some of this issues because the operating system is not quick enough to communicate between processes (when i have way too many things opened, specially heavy things like videos or videocalls) (edited)
Adam Lawrence 1 hour ago OK, I'll try that in a little while and get back to you
Victor Negîrneac 1 hour ago This might pinpoint the issue, tough I do not have a solutions yet
Victor Negîrneac 1 hour ago thanks
Adam Lawrence 1 hour ago Yes - it worked when I closed down everything except Google Chrome.
Adam Lawrence 1 hour ago =============================================== 88 passed, 83 warnings in 90.99s (0:01:30) ===============================================
Adam Lawrence 1 hour ago I suppose this is good enough for the time being
Victor Negîrneac 1 hour ago could create an issue about it in quantify-core? you could put there our chat for future reference