summaryrefslogtreecommitdiff
path: root/testing/code
diff options
context:
space:
mode:
authorRonny Pfannschmidt <ronny.pfannschmidt@redhat.com>2016-06-22 14:39:33 +0200
committerRonny Pfannschmidt <ronny.pfannschmidt@redhat.com>2016-06-22 14:39:33 +0200
commit083f64100d2b4a7074bb46b0e5c2443c5323114e (patch)
tree325c009862c93d565a6da4c74657b35243d30adc /testing/code
parent4350f499b2bdf0bcc24e55787436928b021489e3 (diff)
parent24179dc99fd8d7c5196f583aedd9121441abac8e (diff)
downloadpytest-083f64100d2b4a7074bb46b0e5c2443c5323114e.tar.gz
merge master into features
Diffstat (limited to 'testing/code')
-rw-r--r--testing/code/test_excinfo.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py
index d519dc01e..59756645a 100644
--- a/testing/code/test_excinfo.py
+++ b/testing/code/test_excinfo.py
@@ -1066,3 +1066,15 @@ def test_repr_traceback_with_unicode(style, encoding):
formatter = FormattedExcinfo(style=style)
repr_traceback = formatter.repr_traceback(e_info)
assert repr_traceback is not None
+
+
+def test_cwd_deleted(testdir):
+ testdir.makepyfile("""
+ def test(tmpdir):
+ tmpdir.chdir()
+ tmpdir.remove()
+ assert False
+ """)
+ result = testdir.runpytest()
+ result.stdout.fnmatch_lines(['* 1 failed in *'])
+ assert 'INTERNALERROR' not in result.stdout.str() + result.stderr.str() \ No newline at end of file