MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_reevaluate_dynamic_expr

Method test_reevaluate_dynamic_expr

testing/test_mark.py:731–759  ·  view source on GitHub ↗

#7360

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

729 reprec.assertoutcome(skipped=1)
730
731 def test_reevaluate_dynamic_expr(self, pytester: Pytester) -> None:
732 """#7360"""
733 py_file1 = pytester.makepyfile(
734 test_reevaluate_dynamic_expr1="""
735 import pytest
736
737 skip = True
738
739 @pytest.mark.skipif("skip")
740 def test_should_skip():
741 assert True
742 """
743 )
744 py_file2 = pytester.makepyfile(
745 test_reevaluate_dynamic_expr2="""
746 import pytest
747
748 skip = False
749
750 @pytest.mark.skipif("skip")
751 def test_should_not_skip():
752 assert True
753 """
754 )
755
756 file_name1 = os.path.basename(py_file1)
757 file_name2 = os.path.basename(py_file2)
758 reprec = pytester.inline_run(file_name1, file_name2)
759 reprec.assertoutcome(passed=1, skipped=1)
760
761
762class TestKeywordSelection:

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected