From 5e6ce8f43306be77d54cf131f53f5012f2d8a785 Mon Sep 17 00:00:00 2001 From: Yusuke Kadowaki Date: Sat, 3 Dec 2022 16:35:02 +0900 Subject: [PATCH] Refactor tests for tmpdir --- testing/test_tmpdir.py | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/testing/test_tmpdir.py b/testing/test_tmpdir.py index 6a29c03b1..1daf04613 100644 --- a/testing/test_tmpdir.py +++ b/testing/test_tmpdir.py @@ -100,7 +100,7 @@ class TestConfigTmpPath: """ ) p_failed = pytester.makepyfile( - """ + another_file_name=""" def test_1(tmp_path): assert 0 == 1 """ @@ -186,23 +186,6 @@ class TestConfigTmpPath: assert len(test_dir) == 1 assert test_dir[0].name == "test_20" - def test_policy_failed_removes_basedir_when_all_passed( - self, pytester: Pytester - ) -> None: - p = pytester.makepyfile( - """ - def test_1(tmp_path): - assert 0 == 0 - """ - ) - - pytester.inline_run(p) - root = pytester._test_tmproot - for child in root.iterdir(): - base_dir = list(child.iterdir()) - # Check the base dir itself is gone - assert base_dir == [] - # issue #10502 def test_policy_failed_removes_dir_when_skipped_from_fixture( self, pytester: Pytester