From ac9c8fcdab8fcaa932100fed9dd67424609e310b Mon Sep 17 00:00:00 2001 From: Andreas Pelme Date: Fri, 16 Dec 2016 15:29:08 +0100 Subject: [PATCH] Failing test for issue #2121 --- testing/test_assertrewrite.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 11b5ce051..8aee520b3 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -956,3 +956,17 @@ class TestIssue925(object): result = testdir.runpytest() result.stdout.fnmatch_lines('*E*assert True == ((False == True) == True)') + +class TestIssue2121(): + def test_simple(self, testdir): + testdir.tmpdir.join("tests/file.py").ensure().write(""" +def test_simple_failure(): + assert 1 + 1 == 3 +""") + testdir.tmpdir.join("pytest.ini").write(py.std.textwrap.dedent(""" + [pytest] + python_files = tests/**.py + """)) + + result = testdir.runpytest() + result.stdout.fnmatch_lines('*E*assert (1 + 1) == 3')