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

Method test_accesskeywords

testing/python/fixtures.py:1135–1149  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

1133 req1.applymarker(42) # type: ignore[arg-type]
1134
1135 def test_accesskeywords(self, pytester: Pytester) -> None:
1136 pytester.makepyfile(
1137 """
1138 import pytest
1139 @pytest.fixture()
1140 def keywords(request):
1141 return request.keywords
1142 @pytest.mark.XYZ
1143 def test_function(keywords):
1144 assert keywords["XYZ"]
1145 assert "abc" not in keywords
1146 """
1147 )
1148 reprec = pytester.inline_run()
1149 reprec.assertoutcome(passed=1)
1150
1151 def test_accessmarker_dynamic(self, pytester: Pytester) -> None:
1152 pytester.makeconftest(

Callers

nothing calls this directly

Calls 3

assertoutcomeMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected