Skip to content

Commit 45ba736

Browse files
authored
Merge pull request #5128 from blueyed/mark-is
Fix error message with unregistered markers
2 parents c453fe7 + cc005af commit 45ba736

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
@@ -312,7 +312,7 @@ def __getattr__(self, name):
312312
# then it really is time to issue a warning or an error.
313313
if name not in self._markers:
314314
if self._config.option.strict:
315-
fail("{!r} not a registered marker".format(name), pytrace=False)
315+
fail("{!r} is not a registered marker".format(name), pytrace=False)
316316
else:
317317
warnings.warn(
318318
"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
@@ -205,7 +205,7 @@ def test_hello():
205205
)
206206
result = testdir.runpytest("--strict")
207207
assert result.ret != 0
208-
result.stdout.fnmatch_lines(["'unregisteredmark' not a registered marker"])
208+
result.stdout.fnmatch_lines(["'unregisteredmark' is not a registered marker"])
209209

210210

211211
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)