From 348cda869824e9e68956a347bdd39dd29103cc77 Mon Sep 17 00:00:00 2001 From: nstelter-slac Date: Tue, 3 Dec 2024 18:19:23 -0800 Subject: [PATCH] MNT: install correct pyca with conda. pyca requires us to explicity use previous release of epicscorelibs This test can be enabled now that we are using correct pyca package from conda. (was done in commit: cd41385ed3233376305b5a93e9c78a5f658a9c4b) Installing correct library and enabling test fixes issue where a user downloads pydm and runs the tests with pytest cmd directly (instead of run_tests.py), only to see 'no module named psp' failure. This failure seems to suggest to user to 'pip install psp', which is entirely the wrong package and just leads to further confusion. --- conda-recipe/meta.yaml | 1 + pydm/tests/data_plugins/test_psp_plugin_component.py | 6 ++++++ requirements.txt | 1 + run_tests.py | 1 - 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 4a13dbe23..1a8ead632 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -29,6 +29,7 @@ requirements: - pyqtgraph - qtpy - entrypoints + - pyca test: imports: diff --git a/pydm/tests/data_plugins/test_psp_plugin_component.py b/pydm/tests/data_plugins/test_psp_plugin_component.py index 884515ccd..4aff68b24 100644 --- a/pydm/tests/data_plugins/test_psp_plugin_component.py +++ b/pydm/tests/data_plugins/test_psp_plugin_component.py @@ -1,3 +1,4 @@ +import time import functools import pydm.data_plugins.epics_plugins.psp_plugin_component from pydm.data_plugins.epics_plugins.psp_plugin_component import Connection @@ -19,6 +20,11 @@ def __init__(self): def severity(self): return None + def timestamp(self): + secs = time.time() + nanos = time.time_ns() + return secs, nanos + def test_update_ctrl_vars(monkeypatch: MonkeyPatch, signals: ConnectionSignals): """Invoke our callback for updating the control values for a PV as if we had a monitor on it. Verify diff --git a/requirements.txt b/requirements.txt index 9d3ff981a..fc8db43b5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,3 +5,4 @@ pyqtgraph>=0.12.0 qtpy scipy>=0.12.0 six +epicscorelibs==7.0.7.99.0.2 diff --git a/run_tests.py b/run_tests.py index 4d3a49456..0cae5118b 100644 --- a/run_tests.py +++ b/run_tests.py @@ -21,7 +21,6 @@ # and a Windows PyCA build exists if os.name == "nt": args.append("--ignore=pydm/tests/data_plugins/test_p4p_plugin_component.py") - args.append("--ignore=pydm/tests/data_plugins/test_psp_plugin_component.py") print("pytest arguments: {}".format(args))