From 8cba033bbb16b73726249da8723a9ffec9024ecc Mon Sep 17 00:00:00 2001 From: Lev Maximov Date: Tue, 20 Sep 2016 02:16:04 +0700 Subject: [PATCH] added a test --- testing/test_assertion.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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() +