From 5e883bc00ccb81dce6a2e4a275e9e9bdda2d5874 Mon Sep 17 00:00:00 2001 From: skshetry Date: Tue, 1 Nov 2022 11:28:09 +0545 Subject: [PATCH] tests: remove TestDir (#8502) remove TestDir --- tests/basic_env.py | 8 +------- tests/func/test_gc.py | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/tests/basic_env.py b/tests/basic_env.py index 53562152f..058faa4f3 100644 --- a/tests/basic_env.py +++ b/tests/basic_env.py @@ -94,7 +94,7 @@ class TestDirFixture: self._popd() try: remove(self._root_dir) - except OSError as exc: + except OSError as exc: # pragma: no cover # pylint: disable=no-member # We ignore this under Windows with a warning because it happened # to be really hard to trace all not properly closed files. @@ -149,12 +149,6 @@ class TestDvcGitFixture(TestGitFixture): # NOTE: Inheritance order in the classes below is important. -class TestDir(TestDirFixture, TestCase): - def __init__(self, methodName): - TestDirFixture.__init__(self) - TestCase.__init__(self, methodName) - - class TestDvc(TestDvcFixture, TestCase): def __init__(self, methodName): TestDvcFixture.__init__(self) diff --git a/tests/func/test_gc.py b/tests/func/test_gc.py index 3c8cabfcf..f4b958ed2 100644 --- a/tests/func/test_gc.py +++ b/tests/func/test_gc.py @@ -12,7 +12,7 @@ from dvc.fs import LocalFileSystem from dvc.repo import Repo as DvcRepo from dvc.utils.fs import remove from dvc_data.hashfile.db.local import LocalHashFileDB -from tests.basic_env import TestDir, TestDvcGit +from tests.basic_env import TestDvcGit class TestGC(TestDvcGit): @@ -122,7 +122,7 @@ class TestGCMultipleDvcRepos(TestDvcGit): def setUp(self): super().setUp() - self.additional_path = TestDir.mkdtemp() + self.additional_path = self.mkdtemp() self.additional_git = Repo.init(self.additional_path) self.additional_dvc = DvcRepo.init(self.additional_path)