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

Unified Diff: tests/gclient_scm_test.py

Issue 1742017: Add --reset-to-deps and improve comments (Closed)
Patch Set: fix tests Created 10 years, 8 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 | « gclient_scm.py ('k') | tests/scm_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/gclient_scm_test.py
diff --git a/tests/gclient_scm_test.py b/tests/gclient_scm_test.py
index fb2ea42e70f6303f6cac3d90054b699e25aab35a..20a4cbdb08263a0caedb33d8ffdfb7c84c589edd 100755
--- a/tests/gclient_scm_test.py
+++ b/tests/gclient_scm_test.py
@@ -527,10 +527,12 @@ from :3
return
options = self.Options()
file_path = gclient_scm.os.path.join(self.base_path, 'a')
- gclient_scm.os.remove(file_path)
scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
relpath=self.relpath)
file_list = []
+ scm.update(options, None, file_list)
+ gclient_scm.os.remove(file_path)
+ file_list = []
scm.revert(options, self.args, file_list)
self.assertEquals(file_list, [file_path])
file_list = []
@@ -544,41 +546,47 @@ from :3
scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
relpath=self.relpath)
file_list = []
+ scm.update(options, None, file_list)
+ file_list = []
scm.revert(options, self.args, file_list)
self.assertEquals(file_list, [])
self.assertEquals(scm.revinfo(options, self.args, None),
- '069c602044c5388d2d15c3f875b057c852003458')
+ 'a7142dc9f0009350b96a11f372b6ea658592aa95')
def testRevertModified(self):
if not self.enabled:
return
options = self.Options()
- file_path = gclient_scm.os.path.join(self.base_path, 'a')
- open(file_path, 'a').writelines('touched\n')
scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
relpath=self.relpath)
file_list = []
+ scm.update(options, None, file_list)
+ file_path = gclient_scm.os.path.join(self.base_path, 'a')
+ open(file_path, 'a').writelines('touched\n')
+ file_list = []
scm.revert(options, self.args, file_list)
self.assertEquals(file_list, [file_path])
file_list = []
scm.diff(options, self.args, file_list)
self.assertEquals(file_list, [])
self.assertEquals(scm.revinfo(options, self.args, None),
- '069c602044c5388d2d15c3f875b057c852003458')
+ 'a7142dc9f0009350b96a11f372b6ea658592aa95')
def testRevertNew(self):
if not self.enabled:
return
options = self.Options()
+ scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
+ relpath=self.relpath)
+ file_list = []
+ scm.update(options, None, file_list)
file_path = gclient_scm.os.path.join(self.base_path, 'c')
f = open(file_path, 'w')
f.writelines('new\n')
f.close()
Popen(['git', 'add', 'c'], stdout=PIPE,
stderr=STDOUT, cwd=self.base_path).communicate()
- scm = gclient_scm.CreateSCM(url=self.url, root_dir=self.root_dir,
- relpath=self.relpath)
file_list = []
scm.revert(options, self.args, file_list)
self.assertEquals(file_list, [file_path])
@@ -586,7 +594,7 @@ from :3
scm.diff(options, self.args, file_list)
self.assertEquals(file_list, [])
self.assertEquals(scm.revinfo(options, self.args, None),
- '069c602044c5388d2d15c3f875b057c852003458')
+ 'a7142dc9f0009350b96a11f372b6ea658592aa95')
def testStatusNew(self):
if not self.enabled:
« no previous file with comments | « gclient_scm.py ('k') | tests/scm_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698