diff options
author | Lev Maximov <lev.maximov@gmail.com> | 2016-09-20 02:16:04 +0700 |
---|---|---|
committer | Lev Maximov <lev.maximov@gmail.com> | 2016-09-20 02:47:59 +0700 |
commit | 8cba033bbb16b73726249da8723a9ffec9024ecc (patch) | |
tree | 58f06700d0b42c82dcf9b71c632e30e122c5946d /testing | |
parent | 6b56c36ae7712cc68b3e7bf2ffd86ba90cde6e0f (diff) | |
download | pytest-8cba033bbb16b73726249da8723a9ffec9024ecc.tar.gz |
added a test
Diffstat (limited to 'testing')
-rw-r--r-- | testing/test_assertion.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/test_assertion.py b/testing/test_assertion.py index af7e7e0fe..2d4761431 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -864,3 +864,15 @@ def test_assert_with_unicode(monkeypatch, testdir): """) result = testdir.runpytest() result.stdout.fnmatch_lines(['*AssertionError*']) + +def test_issue_1944(testdir): + testdir.makepyfile(""" + def f(): + return + + assert f() == 10 + """) + result = testdir.runpytest() + result.stdout.fnmatch_lines(["*1 error*"]) + assert "AttributeError: 'Module' object has no attribute '_obj'" not in result.stdout.str() + |