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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py

Issue 2237083002: In rebaseline-cl: add option to only rebaseline tests changed in the CL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py
index 494f7481e782c799e3550c26f074c3e261400b06..f9bae66eb3d38b087a0ef4e035b89c4e72bf4180 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/rietveld_unittest.py
@@ -10,6 +10,7 @@ import urllib2
from webkitpy.common.net.rietveld import filter_latest_jobs
from webkitpy.common.net.rietveld import get_latest_try_job_results
from webkitpy.common.net.rietveld import latest_try_jobs
+from webkitpy.common.net.rietveld import changed_files
from webkitpy.common.net.buildbot import Build
from webkitpy.common.net.web_mock import MockWeb
from webkitpy.common.system.outputcapture import OutputCapture
@@ -52,6 +53,10 @@ class RietveldTest(unittest.TestCase):
'result': 0
},
],
+ 'files': {
+ 'some/path/foo.cc': {'status': 'M'},
+ 'some/path/bar.html': {'status': 'M'},
+ }
}),
'https://codereview.chromium.org/api/11113333': 'my non-JSON contents',
})
@@ -110,3 +115,11 @@ class RietveldTest(unittest.TestCase):
self.assertEqual(
filter_latest_jobs([Build('foo', 3), Build('bar')]),
[Build('foo', 3)])
+
+ def test_changed_files(self):
+ self.assertEqual(
+ changed_files(11112222, self.web),
+ ['some/path/bar.html', 'some/path/foo.cc'])
+
+ def test_changed_files_no_results(self):
+ self.assertIsNone(changed_files(11113333, self.web))

Powered by Google App Engine
This is Rietveld 408576698