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

Unified Diff: unittests/package_test.py

Issue 1849903002: Perform Git operations without changing CWD. (Closed) Base URL: https://github.com/luci/recipes-py@master
Patch Set: Created 4 years, 9 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
« recipe_engine/package.py ('K') | « recipe_engine/package.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unittests/package_test.py
diff --git a/unittests/package_test.py b/unittests/package_test.py
index 019ede44d7c7bf31666ae0baeb323d90deb73506..d3924863a2cde0f9726ae61f7a70383fe97e36f5 100755
--- a/unittests/package_test.py
+++ b/unittests/package_test.py
@@ -64,8 +64,9 @@ class TestGitRepoSpec(MockIOThings, unittest.TestCase):
os.path.join(self.context.package_dir, 'funny_recipes')],
cwd=None)
self.mock_subprocess.check_call.assert_any_call(
- ['git', 'reset', '-q', '--hard', 'deadbeef'],
- cwd='repo/root/recipes/.recipe_deps/funny_recipes')
+ ['git',
+ '--git-dir', 'repo/root/recipes/.recipe_deps/funny_recipes/.git',
+ 'reset', '-q', '--hard', 'deadbeef'], cwd=None)
class MockProtoFile(package.ProtoFile):
« recipe_engine/package.py ('K') | « recipe_engine/package.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698