Skip to content

Commit

Permalink
Fix tests for pytest 3.3 (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
beyondgeeks committed Dec 3, 2017
1 parent 7c0302e commit e14e597
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions tests/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def test_ignore(client):
else:
origin = "'invalid_template.html'"
result.stdout.fnmatch_lines_random([
"tpkg/test_the_test.py F.",
"tpkg/test_the_test.py F.*",
"E * Failed: Undefined template variable 'invalid_var' in {}".format(origin)
])

Expand Down Expand Up @@ -143,7 +143,7 @@ def test_ignore(client):
''')
result = django_testdir.runpytest_subprocess('-s')
result.stdout.fnmatch_lines_random([
"tpkg/test_the_test.py ..",
"tpkg/test_the_test.py ..*",
])


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

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

def test_verbose_with_v(self, testdir):
"""Verbose output with '-v'."""
Expand Down
4 changes: 2 additions & 2 deletions tests/test_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_pass(self):
"CALLED: setUpClass",
"CALLED: setUp",
"CALLED: tearDown",
"PASSED",
"PASSED*",
"CALLED: tearDownClass",
])
assert result.ret == 0
Expand Down Expand Up @@ -215,7 +215,7 @@ def test_pass(self):
"CALLED: setUpClass",
"CALLED: setUp",
"CALLED: tearDown",
"PASSED",
"PASSED*",
"CALLED: tearDownClass",
])
assert result.ret == 0
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ envlist =

[testenv]
deps =
pytest>=3.0,<4.0
pytest>=3.0,<3.4
django-configurations==2.0
pytest-xdist==1.15
{env:_PYTESTDJANGO_TOX_EXTRA_DEPS:}
Expand Down

0 comments on commit e14e597

Please sign in to comment.