merge from master again

This commit is contained in:
Ronny Pfannschmidt
2016-06-22 16:03:52 +02:00
6 changed files with 43 additions and 5 deletions

View File

@@ -490,6 +490,20 @@ class TestRequestBasic:
print(ss.stack)
assert teardownlist == [1]
def test_mark_as_fixture_with_prefix_and_decorator_fails(self, testdir):
testdir.makeconftest("""
import pytest
@pytest.fixture
def pytest_funcarg__marked_with_prefix_and_decorator():
pass
""")
result = testdir.runpytest_subprocess()
assert result.ret != 0
result.stdout.fnmatch_lines([
"*AssertionError:*pytest_funcarg__marked_with_prefix_and_decorator*"
])
def test_request_addfinalizer_failing_setup(self, testdir):
testdir.makepyfile("""
import pytest

View File

@@ -428,7 +428,7 @@ def test_assert_compare_truncate_longmessage(monkeypatch, testdir):
"*- 3",
"*- 5",
"*- 7",
"*truncated (191 more lines)*use*-vv*",
"*truncated (193 more lines)*use*-vv*",
])
@@ -626,3 +626,17 @@ def test_set_with_unsortable_elements():
+ repr(3)
""").strip()
assert '\n'.join(expl) == dedent
def test_diff_newline_at_end(monkeypatch, testdir):
testdir.makepyfile(r"""
def test_diff():
assert 'asdf' == 'asdf\n'
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines(r"""
*assert 'asdf' == 'asdf\n'
* - asdf
* + asdf
* ? +
""")