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

Unified Diff: appengine/findit/libs/gitiles/test/change_log_test.py

Issue 2657913002: [Predator] Add ``Project`` class and ``ClassifySuspect`` method to project and component classifier (Closed)
Patch Set: Fix nits. Created 3 years, 11 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 | « appengine/findit/libs/gitiles/change_log.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/libs/gitiles/test/change_log_test.py
diff --git a/appengine/findit/libs/gitiles/test/change_log_test.py b/appengine/findit/libs/gitiles/test/change_log_test.py
index f0a990f82eecbd38c73746959b7a1c92e49389f0..1622048fa500896140cec32508ad74118f59bb2e 100644
--- a/appengine/findit/libs/gitiles/test/change_log_test.py
+++ b/appengine/findit/libs/gitiles/test/change_log_test.py
@@ -17,6 +17,20 @@ class ChangeLogTest(unittest.TestCase):
filechange_info = FileChangeInfo.FromDict(filechange_dict)
self.assertEqual(filechange_dict, filechange_info.ToDict())
+ def testFileChangeinfoChangedPathProperty(self):
+ """Test ``changed_file`` property of ``FileChangeInfo``."""
+ modified_file = FileChangeInfo.Modify('a.cc')
+ self.assertEqual(modified_file.changed_path, 'a.cc')
+
+ added_file = FileChangeInfo.Modify('a.cc')
+ self.assertEqual(added_file.changed_path, 'a.cc')
+
+ copied_file = FileChangeInfo.Copy('old.cc', 'new.cc')
+ self.assertEqual(copied_file.changed_path, 'new.cc')
+
+ deleted_file = FileChangeInfo.Delete('old.cc')
+ self.assertEqual(deleted_file.changed_path, 'old.cc')
+
def testChangeLog(self):
change_log_dict = {
'author': {
« no previous file with comments | « appengine/findit/libs/gitiles/change_log.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698