From cc005af47ee31bc1364b29fef7de72a65889ad99 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 15 Apr 2019 10:15:37 +0200 Subject: [PATCH] Fix error message with unregistered markers --- src/_pytest/mark/structures.py | 2 +- testing/test_mark.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/mark/structures.py b/src/_pytest/mark/structures.py index f3602b2d5..5b88bceda 100644 --- a/src/_pytest/mark/structures.py +++ b/src/_pytest/mark/structures.py @@ -306,7 +306,7 @@ class MarkGenerator(object): # then it really is time to issue a warning or an error. if name not in self._markers: if self._config.option.strict: - fail("{!r} not a registered marker".format(name), pytrace=False) + fail("{!r} is not a registered marker".format(name), pytrace=False) else: warnings.warn( "Unknown pytest.mark.%s - is this a typo? You can register " diff --git a/testing/test_mark.py b/testing/test_mark.py index cb20658b5..e3a9f0c4c 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -204,7 +204,7 @@ def test_strict_prohibits_unregistered_markers(testdir): ) result = testdir.runpytest("--strict") assert result.ret != 0 - result.stdout.fnmatch_lines(["'unregisteredmark' not a registered marker"]) + result.stdout.fnmatch_lines(["'unregisteredmark' is not a registered marker"]) @pytest.mark.parametrize(