From e81528649236ec9fb5983191767a96dc30acff54 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 8 Dec 2022 08:55:54 -0500 Subject: tests: clean up repo_trace._TRACE_FILE patching Patch this automatically for all tests rather than duplicating the boilerplate in diff testcases. Change-Id: I391d5c859974cda3d5680d34ede2ce6e9e925838 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354358 Reviewed-by: Joanna Wang Tested-by: Mike Frysinger --- tests/test_project.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'tests/test_project.py') diff --git a/tests/test_project.py b/tests/test_project.py index 7ab44984..66c05f6a 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -27,7 +27,6 @@ import git_command import git_config import platform_utils import project -import repo_trace @contextlib.contextmanager @@ -66,13 +65,6 @@ class FakeProject(object): class ReviewableBranchTests(unittest.TestCase): """Check ReviewableBranch behavior.""" - def setUp(self): - self.tempdirobj = tempfile.TemporaryDirectory(prefix='repo_tests') - repo_trace._TRACE_FILE = os.path.join(self.tempdirobj.name, 'TRACE_FILE_from_test') - - def tearDown(self): - self.tempdirobj.cleanup() - def test_smoke(self): """A quick run through everything.""" with TempGitTree() as tempdir: @@ -418,8 +410,6 @@ class ManifestPropertiesFetchedCorrectly(unittest.TestCase): """Ensure properties are fetched properly.""" def setUpManifest(self, tempdir): - repo_trace._TRACE_FILE = os.path.join(tempdir, 'TRACE_FILE_from_test') - repodir = os.path.join(tempdir, '.repo') manifest_dir = os.path.join(repodir, 'manifests') manifest_file = os.path.join( -- cgit v1.2.3-54-g00ecf