merge from master again
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
* ? +
|
||||
""")
|
||||
|
||||
Reference in New Issue
Block a user