Commit f6da28bd authored by Matias Guijarro's avatar Matias Guijarro

tests: clean_globals reset simulation_diode module globals

parent 097dedac
......@@ -149,7 +149,7 @@ bliss % more setup.cfg
[tool:pytest]
addopts = -v --ignore=tests/images --ignore=tests/test_configuration --ignore=tests/controllers_hw
usefixtures = clean_louie clean_gevent clean_session
usefixtures = clean_louie clean_gevent clean_globals
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
......
[tool:pytest]
addopts = -v --ignore=tests/images --ignore=tests/test_configuration --ignore=tests/controllers_hw --ignore=tests/emulators
usefixtures = clean_louie clean_gevent clean_session
usefixtures = clean_louie clean_gevent clean_globals
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
......
......@@ -27,6 +27,7 @@ from bliss.config.conductor import connection
from bliss.config.conductor.client import get_default_connection
from bliss.controllers.lima.roi import Roi
from bliss.controllers.wago.wago import ModulesConfig
from bliss.controllers import simulation_diode
from bliss.common import plot
from bliss.common.tango import DeviceProxy, DevFailed
from bliss import logging_startup
......@@ -123,10 +124,12 @@ def clean_gevent():
@pytest.fixture
def clean_session():
# assert main._GLOBAL_DICT['session'] is None
def clean_globals():
yield
global_map.clear()
# reset module-level globals
simulation_diode.DEFAULT_CONTROLLER = None
simulation_diode.DEFAULT_INTEGRATING_CONTROLLER = None
@pytest.fixture(scope="session")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment