1"""Tests that a failed pytest properly displays the call stack. 2Uses the output from running pytest with pytest_plugin_failing_test.py. 3Regression test for #381. 4""" 5 6 7def test_failed_testresult_stacktrace(): 8 with open('testresult.txt') as f: 9 contents = f.read() 10 # before the fix, a triple question mark has been displayed 11 # instead of the stacktrace 12 assert contents 13 print('contents', contents) 14 assert '???' not in contents 15 assert 'AttributeError' not in contents 16 assert 'def test_fs(fs):' in contents 17