Skip to content

Commit

Permalink
use testdir instead of tmpdir
Browse files Browse the repository at this point in the history
  • Loading branch information
marscher committed Jun 8, 2016
1 parent f5b3137 commit c3a9700
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions testing/code/test_excinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,10 +925,13 @@ def test_repr_traceback_with_unicode(style, encoding):
repr_traceback = formatter.repr_traceback(e_info)
assert repr_traceback is not None


@pytest.mark.xfail
def test_cwd_deleted_(tmpdir):
tmpdir.chdir()
tmpdir.remove()
def test_cwd_deleted_(testdir):
import shutil
testdir.chdir()
n = testdir.tmpdir.dirname
shutil.rmtree(n)
# this should intentionally trigger a test failure
# in order to test correct exception handling for missing cwd.
assert False
Expand Down

0 comments on commit c3a9700

Please sign in to comment.