From 9e24b09a9f96908534e7bfb313df4a2c136b5094 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 13 Mar 2018 20:59:10 -0300 Subject: [PATCH] Use re_match_lines in test_class_ordering "[1-a]" works fine using fnmatch_lines, but "[a-1]" breaks horribly inside `re`. --- testing/python/fixture.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/testing/python/fixture.py b/testing/python/fixture.py index 8638e361a..d1098799d 100644 --- a/testing/python/fixture.py +++ b/testing/python/fixture.py @@ -2281,19 +2281,19 @@ class TestFixtureMarker(object): pass """) result = testdir.runpytest("-vs") - result.stdout.fnmatch_lines(""" - test_class_ordering.py::TestClass2::test_1[1-a] PASSED - test_class_ordering.py::TestClass2::test_1[2-a] PASSED - test_class_ordering.py::TestClass2::test_2[1-a] PASSED - test_class_ordering.py::TestClass2::test_2[2-a] PASSED - test_class_ordering.py::TestClass2::test_1[1-b] PASSED - test_class_ordering.py::TestClass2::test_1[2-b] PASSED - test_class_ordering.py::TestClass2::test_2[1-b] PASSED - test_class_ordering.py::TestClass2::test_2[2-b] PASSED - test_class_ordering.py::TestClass::test_3[1-a] PASSED - test_class_ordering.py::TestClass::test_3[2-a] PASSED - test_class_ordering.py::TestClass::test_3[1-b] PASSED - test_class_ordering.py::TestClass::test_3[2-b] PASSED + result.stdout.re_match_lines(r""" + test_class_ordering.py::TestClass2::test_1\[1-a\] PASSED + test_class_ordering.py::TestClass2::test_1\[2-a\] PASSED + test_class_ordering.py::TestClass2::test_2\[1-a\] PASSED + test_class_ordering.py::TestClass2::test_2\[2-a\] PASSED + test_class_ordering.py::TestClass2::test_1\[1-b\] PASSED + test_class_ordering.py::TestClass2::test_1\[2-b\] PASSED + test_class_ordering.py::TestClass2::test_2\[1-b\] PASSED + test_class_ordering.py::TestClass2::test_2\[2-b\] PASSED + test_class_ordering.py::TestClass::test_3\[1-a\] PASSED + test_class_ordering.py::TestClass::test_3\[2-a\] PASSED + test_class_ordering.py::TestClass::test_3\[1-b\] PASSED + test_class_ordering.py::TestClass::test_3\[2-b\] PASSED """) def test_parametrize_separated_order_higher_scope_first(self, testdir):