Skip to content

Commit dc574c6

Browse files
committed
Use regex match-count syntax to improve test readability
1 parent 1d26f37 commit dc574c6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

testing/test_terminal.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,9 @@ def test_foobar(i): pass
991991
def test_normal(self, many_tests_file, testdir):
992992
output = testdir.runpytest()
993993
output.stdout.re_match_lines([
994-
r'test_bar.py \.\.\.\.\.\.\.\.\.\. \s+ \[ 50%\]',
995-
r'test_foo.py \.\.\.\.\. \s+ \[ 75%\]',
996-
r'test_foobar.py \.\.\.\.\. \s+ \[100%\]',
994+
r'test_bar.py \.{10} \s+ \[ 50%\]',
995+
r'test_foo.py \.{5} \s+ \[ 75%\]',
996+
r'test_foobar.py \.{5} \s+ \[100%\]',
997997
])
998998

999999
def test_verbose(self, many_tests_file, testdir):
@@ -1008,7 +1008,7 @@ def test_xdist_normal(self, many_tests_file, testdir):
10081008
pytest.importorskip('xdist')
10091009
output = testdir.runpytest('-n2')
10101010
output.stdout.re_match_lines([
1011-
r'\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\.\. \s+ \[100%\]',
1011+
r'\.{20} \s+ \[100%\]',
10121012
])
10131013

10141014
def test_xdist_verbose(self, many_tests_file, testdir):

0 commit comments

Comments
 (0)