From a326fa22c6e5ad711ffecd3a8f9432737d0ccc1b Mon Sep 17 00:00:00 2001 From: Christoph Buelter Date: Thu, 5 Dec 2019 17:02:18 +0100 Subject: [PATCH] Add a failing test to ensure not everything matches by accident --- testing/test_collection.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/testing/test_collection.py b/testing/test_collection.py index fcbfcf5fb..e7bcb60a9 100644 --- a/testing/test_collection.py +++ b/testing/test_collection.py @@ -836,12 +836,15 @@ class TestNodekeywords: def test(self): assert True + def test_failing_5(): + assert False, "This should not match" + """ ) - num_all_tests_passed = 4 + num_matching_tests = 4 for expression in ("specifictopic", "SPECIFICTOPIC", "SpecificTopic"): reprec = testdir.inline_run("-k " + expression) - reprec.assertoutcome(passed=num_all_tests_passed, failed=0) + reprec.assertoutcome(passed=num_matching_tests, failed=0) COLLECTION_ERROR_PY_FILES = dict(