added a test

This commit is contained in:
Lev Maximov 2016-09-20 02:16:04 +07:00
parent 6b56c36ae7
commit 8cba033bbb
1 changed files with 12 additions and 0 deletions

View File

@ -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()