Add clear exceptions from previous tests where MolerTest decorator not used
@@ -374,6 +374,8 @@ def test_can_load_configuration_when_already_loaded_from_same_file(moler_config,
@pytest.yield_fixture
def moler_config():
import moler.config as moler_cfg
+ from moler.connection_observer import ConnectionObserver
+ ConnectionObserver.get_unraised_exceptions()
moler_cfg.loaded_config = "NOT_LOADED_YET"
yield moler_cfg
# restore since tests may change configuration
@@ -383,6 +385,8 @@ def moler_config():
@pytest.yield_fixture
def device_config():
import moler.config.devices as dev_cfg
+ from moler.connection_observer import ConnectionObserver
+ ConnectionObserver.get_unraised_exceptions()
yield dev_cfg
# restore since tests may change configuration
dev_cfg.clear()
@@ -391,6 +395,8 @@ def device_config():
@pytest.yield_fixture
def device_factory():
from moler.device.device import DeviceFactory as dev_factory
+ from moler.connection_observer import ConnectionObserver
+ ConnectionObserver.get_unraised_exceptions()
yield dev_factory
# restore since tests may change configuration
dev_factory._clear()
