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

Function test_ini_markers

testing/test_mark.py:65–85  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

63
64
65def test_ini_markers(pytester: Pytester) -> None:
66 pytester.makeini(
67 """
68 [pytest]
69 markers =
70 a1: this is a webtest marker
71 a2: this is a smoke marker
72 """
73 )
74 pytester.makepyfile(
75 """
76 def test_markers(pytestconfig):
77 markers = pytestconfig.getini("markers")
78 print(markers)
79 assert len(markers) >= 2
80 assert markers[0].startswith("a1:")
81 assert markers[1].startswith("a2:")
82 """
83 )
84 rec = pytester.inline_run()
85 rec.assertoutcome(passed=1)
86
87
88def test_markers_option(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

assertoutcomeMethod · 0.80
makeiniMethod · 0.45
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected