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

Function test_class_method_containing_test_issue1558

testing/test_unittest.py:1013–1027  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1011
1012
1013def test_class_method_containing_test_issue1558(pytester: Pytester) -> None:
1014 pytester.makepyfile(
1015 test_foo="""
1016 import unittest
1017
1018 class MyTestCase(unittest.TestCase):
1019 def test_should_run(self):
1020 pass
1021 def test_should_not_run(self):
1022 pass
1023 test_should_not_run.__test__ = False
1024 """
1025 )
1026 reprec = pytester.inline_run()
1027 reprec.assertoutcome(passed=1)
1028
1029
1030@pytest.mark.parametrize("base", ["builtins.object", "unittest.TestCase"])

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected