@@ -557,7 +557,7 @@ def test_outcomeexception_passes_except_Exception() -> None:
557
557
try :
558
558
raise outcomes .OutcomeException ("test" )
559
559
except Exception :
560
- pass
560
+ raise NotImplementedError ()
561
561
562
562
563
563
def test_pytest_exit () -> None :
@@ -740,8 +740,9 @@ def f():
740
740
mod2 = pytest .importorskip ("hello123" , minversion = "1.3" )
741
741
assert mod2 == mod
742
742
except Skipped :
743
- print (_pytest ._code .ExceptionInfo .from_current ())
744
- pytest .fail ("spurious skip" )
743
+ raise NotImplementedError (
744
+ "spurious skip: {}" .format (_pytest ._code .ExceptionInfo .from_current ())
745
+ )
745
746
746
747
747
748
def test_importorskip_imports_last_module_part () -> None :
@@ -759,8 +760,9 @@ def test_importorskip_dev_module(monkeypatch) -> None:
759
760
with pytest .raises (Skipped ):
760
761
pytest .importorskip ("mockmodule1" , minversion = "0.14.0" )
761
762
except Skipped :
762
- print (_pytest ._code .ExceptionInfo .from_current ())
763
- pytest .fail ("spurious skip" )
763
+ raise NotImplementedError (
764
+ "spurious skip: {}" .format (_pytest ._code .ExceptionInfo .from_current ())
765
+ )
764
766
765
767
766
768
def test_importorskip_module_level (testdir ) -> None :
@@ -1030,7 +1032,7 @@ def test_outcome_exception_bad_msg() -> None:
1030
1032
"""Check that OutcomeExceptions validate their input to prevent confusing errors (#5578)"""
1031
1033
1032
1034
def func () -> None :
1033
- pass
1035
+ raise NotImplementedError ()
1034
1036
1035
1037
expected = (
1036
1038
"OutcomeException expected string as 'msg' parameter, got 'function' instead.\n "
0 commit comments