(self, pytester: Pytester)
| 883 | |
| 884 | class TestSkipif: |
| 885 | def test_skipif_conditional(self, pytester: Pytester) -> None: |
| 886 | item = pytester.getitem( |
| 887 | """ |
| 888 | import pytest |
| 889 | @pytest.mark.skipif("hasattr(os, 'sep')") |
| 890 | def test_func(): |
| 891 | pass |
| 892 | """ |
| 893 | ) |
| 894 | x = pytest.raises(pytest.skip.Exception, lambda: pytest_runtest_setup(item)) |
| 895 | assert x.value.msg == "condition: hasattr(os, 'sep')" |
| 896 | |
| 897 | @pytest.mark.parametrize( |
| 898 | "params", ["\"hasattr(sys, 'platform')\"", 'True, reason="invalid platform"'] |
nothing calls this directly
no test coverage detected