Change pytest test name
@@ -65,7 +65,16 @@ def test_exception_in_observer_is_raised_when_result_is_called_after_set_excepti
assert err.value == exc
-def test_exception_in_observer_is_raised_when_result_is_called_after_set_exception2(do_nothing_connection_observer,
+def test_exception_in_observer_is_ignored_if_no_result_called_nor_decorator_on_function(do_nothing_connection_observer,
+ ObserverExceptionClass):
+ def function_using_observer():
+ observer = do_nothing_connection_observer
+ observer.set_exception(ObserverExceptionClass("some error inside observer"))
+
+ function_using_observer() # should not raise so test should pass
+
+
+def test_log_error_in_next_test_when_previous_set_exception(do_nothing_connection_observer,
ObserverExceptionClass):
exc = ObserverExceptionClass("some error inside observer")
@@ -90,15 +99,6 @@ def test_exception_in_observer_is_raised_when_result_is_called_after_set_excepti
assert "some error inside observer" in str(err.value)
-def test_exception_in_observer_is_ignored_if_no_result_called_nor_decorator_on_function(do_nothing_connection_observer,
- ObserverExceptionClass):
- def function_using_observer():
- observer = do_nothing_connection_observer
- observer.set_exception(ObserverExceptionClass("some error inside observer"))
-
- function_using_observer() # should not raise so test should pass
-
-
def test_exception_in_observer_is_raised_if_no_result_called_but_decorator_on_function(do_nothing_connection_observer,
ObserverExceptionClass):
from moler.util.moler_test import MolerTest
