Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: tests/git_common_test.py

Issue 2244023003: Fix broken git tests on mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing_support/git_test_utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_common_test.py
diff --git a/tests/git_common_test.py b/tests/git_common_test.py
index 4b6a1d26973fead2a835084b071a33caf804e02c..c33e9bed83129a88a24482fa1593ee5ad2fb2d8a 100755
--- a/tests/git_common_test.py
+++ b/tests/git_common_test.py
@@ -333,7 +333,6 @@ class GitReadOnlyFunctionsTest(git_test_utils.GitRepoReadOnlyTestBase,
def testRepoRoot(self):
def cd_and_repo_root(path):
- print(os.getcwd())
os.chdir(path)
return self.gc.repo_root()
@@ -649,10 +648,18 @@ class GitMutableStructuredTest(git_test_utils.GitRepoReadWriteTestBase,
])
def testIsGitTreeDirty(self):
- self.assertEquals(False, self.repo.run(self.gc.is_dirty_git_tree, 'foo'))
+ retval = []
+ self.repo.capture_stdio(
+ lambda: retval.append(self.repo.run(self.gc.is_dirty_git_tree, 'foo')))
+
+ self.assertEquals(False, retval[0])
self.repo.open('test.file', 'w').write('test data')
self.repo.git('add', 'test.file')
- self.assertEquals(True, self.repo.run(self.gc.is_dirty_git_tree, 'foo'))
+
+ retval = []
+ self.repo.capture_stdio(
+ lambda: retval.append(self.repo.run(self.gc.is_dirty_git_tree, 'foo')))
+ self.assertEquals(True, retval[0])
def testSquashBranch(self):
self.repo.git('checkout', 'branch_K')
@@ -895,10 +902,8 @@ class GitMakeWorkdir(git_test_utils.GitRepoReadOnlyTestBase, GitCommonTestBase):
A
"""
+ @unittest.skipIf(not hasattr(os, 'symlink'), "OS doesn't support symlink")
def testMakeWorkdir(self):
- if not hasattr(os, 'symlink'):
- return
-
workdir = os.path.join(self._tempdir, 'workdir')
self.gc.make_workdir(os.path.join(self.repo.repo_path, '.git'),
os.path.join(workdir, '.git'))
« no previous file with comments | « testing_support/git_test_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698