special rmtree is not needed for TemporaryDirectory in 3.8+

This commit is contained in:
Anthony Sottile 2023-01-01 17:12:28 -05:00
parent 092e9a50ae
commit 0a0754e44a
4 changed files with 4 additions and 24 deletions

View file

@ -14,7 +14,6 @@ from pre_commit.util import cmd_output_p
from pre_commit.util import make_executable
from pre_commit.util import parse_version
from pre_commit.util import rmtree
from pre_commit.util import tmpdir
def test_CalledProcessError_str():
@ -74,12 +73,6 @@ def test_clean_path_on_failure_cleans_for_system_exit(in_tmpdir):
assert not os.path.exists('foo')
def test_tmpdir():
with tmpdir() as tempdir:
assert os.path.exists(tempdir)
assert not os.path.exists(tempdir)
def test_cmd_output_exe_not_found():
ret, out, _ = cmd_output('dne', check=False)
assert ret == 1