summaryrefslogtreecommitdiffstats
path: root/tests/test_project.py
diff options
context:
space:
mode:
authorJoanna Wang <jojwang@google.com>2022-11-03 16:51:19 -0400
committerJoanna Wang <jojwang@google.com>2022-11-03 21:07:07 +0000
commita6c52f566acfbff5b0f37158c0d33adf05d250e5 (patch)
treed79d55b872c3be39c54dcb6ef41749c40d39ccf2 /tests/test_project.py
parent0d130d2da0754c546f654ede99a79aac2b8e6c5f (diff)
downloadgit-repo-a6c52f566acfbff5b0f37158c0d33adf05d250e5.tar.gz
Set tracing to always on and save to .repo/TRACE_FILE.
- add `--trace_to_stderr` option so stderr will include trace outputs and any other errors that get sent to stderr - while TRACE_FILE will only include trace outputs piggy-backing on: https://gerrit-review.googlesource.com/c/git-repo/+/349154 Change-Id: I3895a84de4b2784f17fac4325521cd5e72e645e2 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/350114 Reviewed-by: LaMont Jones <lamontjones@google.com> Tested-by: Joanna Wang <jojwang@google.com>
Diffstat (limited to 'tests/test_project.py')
-rw-r--r--tests/test_project.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_project.py b/tests/test_project.py
index acd44ccc..5c600be7 100644
--- a/tests/test_project.py
+++ b/tests/test_project.py
@@ -26,6 +26,7 @@ import git_command
26import git_config 26import git_config
27import platform_utils 27import platform_utils
28import project 28import project
29import repo_trace
29 30
30 31
31@contextlib.contextmanager 32@contextlib.contextmanager
@@ -64,6 +65,13 @@ class FakeProject(object):
64class ReviewableBranchTests(unittest.TestCase): 65class ReviewableBranchTests(unittest.TestCase):
65 """Check ReviewableBranch behavior.""" 66 """Check ReviewableBranch behavior."""
66 67
68 def setUp(self):
69 self.tempdirobj = tempfile.TemporaryDirectory(prefix='repo_tests')
70 repo_trace._TRACE_FILE = os.path.join(self.tempdirobj.name, 'TRACE_FILE_from_test')
71
72 def tearDown(self):
73 self.tempdirobj.cleanup()
74
67 def test_smoke(self): 75 def test_smoke(self):
68 """A quick run through everything.""" 76 """A quick run through everything."""
69 with TempGitTree() as tempdir: 77 with TempGitTree() as tempdir: