Use re_match_lines in test_class_ordering

"[1-a]" works fine using fnmatch_lines, but "[a-1]" breaks horribly
inside `re`.
This commit is contained in:
Bruno Oliveira 2018-03-13 20:59:10 -03:00
parent f61d0525a5
commit 9e24b09a9f
1 changed files with 13 additions and 13 deletions

View File

@ -2281,19 +2281,19 @@ class TestFixtureMarker(object):
pass pass
""") """)
result = testdir.runpytest("-vs") result = testdir.runpytest("-vs")
result.stdout.fnmatch_lines(""" result.stdout.re_match_lines(r"""
test_class_ordering.py::TestClass2::test_1[1-a] PASSED 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_1\[2-a\] PASSED
test_class_ordering.py::TestClass2::test_2[1-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_2\[2-a\] PASSED
test_class_ordering.py::TestClass2::test_1[1-b] 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_1\[2-b\] PASSED
test_class_ordering.py::TestClass2::test_2[1-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::TestClass2::test_2\[2-b\] PASSED
test_class_ordering.py::TestClass::test_3[1-a] 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\[2-a\] PASSED
test_class_ordering.py::TestClass::test_3[1-b] PASSED test_class_ordering.py::TestClass::test_3\[1-b\] PASSED
test_class_ordering.py::TestClass::test_3[2-b] PASSED test_class_ordering.py::TestClass::test_3\[2-b\] PASSED
""") """)
def test_parametrize_separated_order_higher_scope_first(self, testdir): def test_parametrize_separated_order_higher_scope_first(self, testdir):