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

Side by Side Diff: infra_libs/ts_mon/common/test/errors_test.py

Issue 1260293009: make version of ts_mon compatible with appengine (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: add noncululativedistribution metric to ts_mon imports Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import unittest 5 import unittest
6 6
7 from infra_libs.ts_mon import errors 7 try:
8 from infra_libs.ts_mon.common import errors
9 except ImportError: # pragma: no cover
10 from common import errors
8 11
9 12
10 class ErrorsTest(unittest.TestCase): 13 class ErrorsTest(unittest.TestCase):
11 14
12 def test_decreasing_value(self): 15 def test_decreasing_value(self):
13 with self.assertRaises(errors.MonitoringDecreasingValueError) as e: 16 with self.assertRaises(errors.MonitoringDecreasingValueError) as e:
14 raise errors.MonitoringDecreasingValueError('test', 1, 0) 17 raise errors.MonitoringDecreasingValueError('test', 1, 0)
15 str(e.exception) 18 str(e.exception)
16 19
17 def test_duplicate_registration(self): 20 def test_duplicate_registration(self):
(...skipping 28 matching lines...) Expand all
46 49
47 def test_no_configured_monitor_flush(self): 50 def test_no_configured_monitor_flush(self):
48 with self.assertRaises(errors.MonitoringNoConfiguredMonitorError) as e: 51 with self.assertRaises(errors.MonitoringNoConfiguredMonitorError) as e:
49 raise errors.MonitoringNoConfiguredMonitorError(None) 52 raise errors.MonitoringNoConfiguredMonitorError(None)
50 str(e.exception) 53 str(e.exception)
51 54
52 def test_no_configured_target(self): 55 def test_no_configured_target(self):
53 with self.assertRaises(errors.MonitoringNoConfiguredTargetError) as e: 56 with self.assertRaises(errors.MonitoringNoConfiguredTargetError) as e:
54 raise errors.MonitoringNoConfiguredTargetError('test') 57 raise errors.MonitoringNoConfiguredTargetError('test')
55 str(e.exception) 58 str(e.exception)
OLDNEW
« no previous file with comments | « infra_libs/ts_mon/common/test/distribution_test.py ('k') | infra_libs/ts_mon/common/test/helpers_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698