Skip to content

Commit cc005af

Browse files
committed
Fix error message with unregistered markers
1 parent 19035f4 commit cc005af

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/_pytest/mark/structures.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def __getattr__(self, name):
306306
# then it really is time to issue a warning or an error.
307307
if name not in self._markers:
308308
if self._config.option.strict:
309-
fail("{!r} not a registered marker".format(name), pytrace=False)
309+
fail("{!r} is not a registered marker".format(name), pytrace=False)
310310
else:
311311
warnings.warn(
312312
"Unknown pytest.mark.%s - is this a typo? You can register "

testing/test_mark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def test_hello():
204204
)
205205
result = testdir.runpytest("--strict")
206206
assert result.ret != 0
207-
result.stdout.fnmatch_lines(["'unregisteredmark' not a registered marker"])
207+
result.stdout.fnmatch_lines(["'unregisteredmark' is not a registered marker"])
208208

209209

210210
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)