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

Side by Side Diff: slave/skia_slave_scripts/upload_bench_results_test.py

Issue 344183004: Use new common utils where possible. (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: rebase Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Tests for module upload_bench_results.""" 6 """Tests for module upload_bench_results."""
7 7
8 import os 8 import os
9 import sys 9 import sys
10 import unittest 10 import unittest
11 11
12 from utils import misc 12 BUILDBOT_PATH = os.path.realpath(os.path.join(
13 os.path.dirname(os.path.abspath(__file__)), os.pardir, os.pardir))
14
13 # Appending to PYTHONPATH to find common and config. 15 # Appending to PYTHONPATH to find common and config.
14 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 16 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party',
15 'chromium_buildbot', 'scripts')) 17 'chromium_buildbot', 'scripts'))
16 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 18 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party',
17 'chromium_buildbot', 'site_config')) 19 'chromium_buildbot', 'site_config'))
18 sys.path.append(os.path.join(misc.BUILDBOT_PATH, 'third_party', 20 sys.path.append(os.path.join(BUILDBOT_PATH, 'third_party', 'chromium_buildbot',
19 'chromium_buildbot', 'third_party', 'twisted_8_1')) 21 'third_party', 'twisted_8_1'))
20 import upload_bench_results 22 import upload_bench_results
21 23
22 24
23 class ConfigParseTest(unittest.TestCase): 25 class ConfigParseTest(unittest.TestCase):
24 26
25 def test_viewport(self): 27 def test_viewport(self):
26 # pylint: disable=W0212 28 # pylint: disable=W0212
27 result = upload_bench_results._ParseConfig('viewport_100x100') 29 result = upload_bench_results._ParseConfig('viewport_100x100')
28 self.assertEqual(result, { 30 self.assertEqual(result, {
29 'viewport': '100x100', 31 'viewport': '100x100',
(...skipping 24 matching lines...) Expand all
54 def test_badparams(self): 56 def test_badparams(self):
55 # pylint: disable=W0212 57 # pylint: disable=W0212
56 result = upload_bench_results._ParseConfig('foo') 58 result = upload_bench_results._ParseConfig('foo')
57 self.assertEqual(result, { 59 self.assertEqual(result, {
58 'badParams': 'foo' 60 'badParams': 'foo'
59 }) 61 })
60 62
61 63
62 if __name__ == '__main__': 64 if __name__ == '__main__':
63 unittest.main() 65 unittest.main()
OLDNEW
« no previous file with comments | « slave/skia_slave_scripts/upload_bench_results_appengine.py ('k') | slave/skia_slave_scripts/utils/android_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698