diff --git a/testing/deprecated_test.py b/testing/deprecated_test.py index 6473989e6..bad844281 100644 --- a/testing/deprecated_test.py +++ b/testing/deprecated_test.py @@ -26,7 +26,7 @@ def test_funcarg_prefix_deprecation(testdir): """) result = testdir.runpytest('-ra') result.stdout.fnmatch_lines([ - ('WC1 None pytest_funcarg__value: ' + ('pytest_funcarg__value: ' 'declaring fixtures using "pytest_funcarg__" prefix is deprecated ' 'and scheduled to be removed in pytest 4.0. ' 'Please remove the prefix and use the @pytest.fixture decorator instead.'), diff --git a/testing/test_assertion.py b/testing/test_assertion.py index fc2819f69..7ab62e6f3 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -975,7 +975,7 @@ def test_assert_tuple_warning(testdir): assert(False, 'you shall not pass') """) result = testdir.runpytest('-rw') - result.stdout.fnmatch_lines('WR1*:2 assertion is always true*') + result.stdout.fnmatch_lines('*test_assert_tuple_warning.py:2 assertion is always true*') def test_assert_indirect_tuple_no_warning(testdir): testdir.makepyfile(""" diff --git a/testing/test_config.py b/testing/test_config.py index 7876063bd..4b2006a1d 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -632,13 +632,14 @@ class TestWarning(object): pass """) result = testdir.runpytest("--disable-pytest-warnings") - assert result.parseoutcomes()["pytest-warnings"] > 0 + assert result.parseoutcomes()["warnings"] > 0 assert "hello" not in result.stdout.str() result = testdir.runpytest() result.stdout.fnmatch_lines(""" - ===*pytest-warning summary*=== - *WT1*test_warn_on_test_item*:7 hello* + ===*warnings summary*=== + *test_warn_on_test_item_from_request::test_hello* + *hello* """) class TestRootdir(object): diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index 70c02332c..1dd9302f9 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -810,7 +810,10 @@ def test_record_property(testdir): pnodes = psnode.find_by_tag('property') pnodes[0].assert_attr(name="bar", value="1") pnodes[1].assert_attr(name="foo", value="<1") - result.stdout.fnmatch_lines('*C3*test_record_property.py*experimental*') + result.stdout.fnmatch_lines([ + 'test_record_property.py::test_record', + 'record_xml_property*experimental*', + ]) def test_record_property_same_name(testdir): @@ -986,4 +989,4 @@ def test_url_property(testdir): test_case = minidom.parse(str(path)).getElementsByTagName('testcase')[0] - assert (test_case.getAttribute('url') == test_url), "The URL did not get written to the xml" \ No newline at end of file + assert (test_case.getAttribute('url') == test_url), "The URL did not get written to the xml" diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index 3214d868b..3f4ce9aad 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -284,8 +284,8 @@ class TestPytestPluginManager(object): result = testdir.runpytest("-rw", "-p", "skipping1", syspathinsert=True) assert result.ret == EXIT_NOTESTSCOLLECTED result.stdout.fnmatch_lines([ - "WI1*skipped plugin*skipping1*hello*", - "WI1*skipped plugin*skipping2*hello*", + "*skipped plugin*skipping1*hello*", + "*skipped plugin*skipping2*hello*", ]) def test_consider_env_plugin_instantiation(self, testdir, monkeypatch, pytestpm): diff --git a/testing/test_terminal.py b/testing/test_terminal.py index 77fb3b154..838ecf019 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -615,7 +615,7 @@ def test_getreportopt(): class config(object): class option(object): reportchars = "" - disablepytestwarnings = True + disable_warnings = True config.option.reportchars = "sf" assert getreportopt(config) == "sf" @@ -624,11 +624,11 @@ def test_getreportopt(): assert getreportopt(config) == "sfx" config.option.reportchars = "sfx" - config.option.disablepytestwarnings = False + config.option.disable_warnings = False assert getreportopt(config) == "sfxw" config.option.reportchars = "sfxw" - config.option.disablepytestwarnings = False + config.option.disable_warnings = False assert getreportopt(config) == "sfxw" @@ -837,8 +837,8 @@ def test_terminal_summary_warnings_are_displayed(testdir): """) result = testdir.runpytest('-rw') result.stdout.fnmatch_lines([ - '*C1*internal warning', - '*== 1 pytest-warnings in *', + '*internal warning', + '*== 1 warnings in *', ]) @@ -858,9 +858,9 @@ def test_terminal_summary_warnings_are_displayed(testdir): ("yellow", "1 weird", {"weird": (1,)}), ("yellow", "1 passed, 1 weird", {"weird": (1,), "passed": (1,)}), - ("yellow", "1 pytest-warnings", {"warnings": (1,)}), - ("yellow", "1 passed, 1 pytest-warnings", {"warnings": (1,), - "passed": (1,)}), + ("yellow", "1 warnings", {"warnings": (1,)}), + ("yellow", "1 passed, 1 warnings", {"warnings": (1,), + "passed": (1,)}), ("green", "5 passed", {"passed": (1,2,3,4,5)}), diff --git a/testing/test_warnings.py b/testing/test_warnings.py index 3b9908ef7..ad80325f5 100644 --- a/testing/test_warnings.py +++ b/testing/test_warnings.py @@ -75,7 +75,6 @@ def test_setup_teardown_warnings(testdir, pyfile_with_warnings): ]) - @pytest.mark.parametrize('method', ['cmdline', 'ini']) def test_as_errors(testdir, pyfile_with_warnings, method): args = ('-W', 'error') if method == 'cmdline' else ()