Skip to content

Commit

Permalink
Use re_match_lines in test_class_ordering
Browse files Browse the repository at this point in the history
"[1-a]" works fine using fnmatch_lines, but "[a-1]" breaks horribly
inside `re`.
  • Loading branch information
nicoddemus committed Mar 20, 2018
1 parent f61d052 commit 9e24b09
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions testing/python/fixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -2281,19 +2281,19 @@ def test_3(self):
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):
Expand Down

0 comments on commit 9e24b09

Please sign in to comment.