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

Function test_module_level_pytestmark

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

Source from the content-addressed store, hash-verified

437
438
439def test_module_level_pytestmark(pytester: Pytester) -> None:
440 testpath = pytester.makepyfile(
441 """
442 import unittest
443 import pytest
444 pytestmark = pytest.mark.xfail
445 class MyTestCase(unittest.TestCase):
446 def test_func1(self):
447 assert 0
448 """
449 )
450 reprec = pytester.inline_run(testpath, "-s")
451 reprec.assertoutcome(skipped=1)
452
453
454class TestTrialUnittest:

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected