Skip to content

Commit 94cccb9

Browse files
authored
Fix tests for pytest 3.3 (pytest-dev#552)
Fixes pytest-dev#550.
1 parent 4145f73 commit 94cccb9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

tests/test_environment.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_ignore(client):
9696
else:
9797
origin = "'invalid_template.html'"
9898
result.stdout.fnmatch_lines_random([
99-
"tpkg/test_the_test.py F.",
99+
"tpkg/test_the_test.py F.*",
100100
"E * Failed: Undefined template variable 'invalid_var' in {}".format(origin)
101101
])
102102

@@ -143,7 +143,7 @@ def test_ignore(client):
143143
''')
144144
result = django_testdir.runpytest_subprocess('-s')
145145
result.stdout.fnmatch_lines_random([
146-
"tpkg/test_the_test.py ..",
146+
"tpkg/test_the_test.py ..*",
147147
])
148148

149149

@@ -190,13 +190,13 @@ def test_default(self, testdir):
190190
"""Not verbose by default."""
191191
result = testdir.runpytest_subprocess('-s')
192192
result.stdout.fnmatch_lines([
193-
"tpkg/test_the_test.py ."])
193+
"tpkg/test_the_test.py .*"])
194194

195195
def test_vq_verbosity_0(self, testdir):
196196
"""-v and -q results in verbosity 0."""
197197
result = testdir.runpytest_subprocess('-s', '-v', '-q')
198198
result.stdout.fnmatch_lines([
199-
"tpkg/test_the_test.py ."])
199+
"tpkg/test_the_test.py .*"])
200200

201201
def test_verbose_with_v(self, testdir):
202202
"""Verbose output with '-v'."""

tests/test_unittest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_pass(self):
117117
"CALLED: setUpClass",
118118
"CALLED: setUp",
119119
"CALLED: tearDown",
120-
"PASSED",
120+
"PASSED*",
121121
"CALLED: tearDownClass",
122122
])
123123
assert result.ret == 0
@@ -215,7 +215,7 @@ def test_pass(self):
215215
"CALLED: setUpClass",
216216
"CALLED: setUp",
217217
"CALLED: tearDown",
218-
"PASSED",
218+
"PASSED*",
219219
"CALLED: tearDownClass",
220220
])
221221
assert result.ret == 0

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ envlist =
99

1010
[testenv]
1111
deps =
12-
pytest>=3.0,<4.0
12+
pytest>=3.0,<3.4
1313
django-configurations==2.0
1414
pytest-xdist==1.15
1515
{env:_PYTESTDJANGO_TOX_EXTRA_DEPS:}

0 commit comments

Comments
 (0)