From a8641b6d44d1dba1fe4582cfb22a2060896f8af0 Mon Sep 17 00:00:00 2001 From: Dimitri Merejkowsky Date: Tue, 1 Mar 2016 15:17:08 +0100 Subject: [PATCH] Add a test for #1235 --- testing/acceptance_test.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index 74db4425d19..e4b3e8ca709 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -212,6 +212,17 @@ def test_chdir(self, testdir): result = testdir.runpython(p) assert not result.ret + def test_removing_cwd(self, testdir): + testdir.makepyfile(""" + def test_deleting_cwd(tmpdir, monkeypatch): + work = tmpdir.mkdir("work") + monkeypatch.chdir(work) + work.remove() + # Actual testing here + assert False + """) + testdir.runpytest() + def test_issue109_sibling_conftests_not_loaded(self, testdir): sub1 = testdir.tmpdir.mkdir("sub1") sub2 = testdir.tmpdir.mkdir("sub2") @@ -678,4 +689,3 @@ def test_setup_function(self, testdir): * setup *test_1* * call *test_1* """) -