diff --git a/tests/test_plugin.py b/tests/test_plugin.py index 4505c16..c0e7c59 100644 --- a/tests/test_plugin.py +++ b/tests/test_plugin.py @@ -2,6 +2,18 @@ def test_suite_output(pytester): + # a few checks for the scenario where + # pytest-regex is installed as a plugin + # but NO usage of --regex on the pytest + # incantation + dummy_result = pytester.runpytest() + dummy_stdout = dummy_result.stdout.str() + assert "pytest-regex" in dummy_stdout + assert "dummy_regex" not in dummy_stdout + assert "regex-" in dummy_stdout + + # next, check the use of the --regex option + # on the command line result = pytester.runpytest("--regex", "dummy_regex") actual_stdout = result.stdout.str() expected_str1 = "pytest-regex selected"