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

Function test_fixtures_setup_setUpClass_issue8394

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

Source from the content-addressed store, hash-verified

303
304
305def test_fixtures_setup_setUpClass_issue8394(pytester: Pytester) -> None:
306 pytester.makepyfile(
307 """
308 import unittest
309 class MyTestCase(unittest.TestCase):
310 @classmethod
311 def setUpClass(cls):
312 pass
313 def test_func1(self):
314 pass
315 @classmethod
316 def tearDownClass(cls):
317 pass
318 """
319 )
320 result = pytester.runpytest("--fixtures")
321 assert result.ret == 0
322 result.stdout.no_fnmatch_line("*no docstring available*")
323
324 result = pytester.runpytest("--fixtures", "-v")
325 assert result.ret == 0
326 result.stdout.fnmatch_lines(["*no docstring available*"])
327
328
329def test_setup_class(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

no_fnmatch_lineMethod · 0.80
fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected