Skip to content

Fix tests for pytest 3.3 #552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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