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

Side by Side Diff: tools/telemetry/telemetry/test/simple_mock_unittest.py

Issue 12278015: [Telemetry] Reorganize everything. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Re-add shebangs. Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 import unittest 4 import unittest
5 5
6 from telemetry import simple_mock 6 from telemetry.test import simple_mock
7 7
8 _ = simple_mock.DONT_CARE 8 _ = simple_mock.DONT_CARE
9 9
10 class SimpleMockUnitTest(unittest.TestCase): 10 class SimpleMockUnitTest(unittest.TestCase):
11 def testBasic(self): 11 def testBasic(self):
12 mock = simple_mock.MockObject() 12 mock = simple_mock.MockObject()
13 mock.ExpectCall('foo') 13 mock.ExpectCall('foo')
14 14
15 mock.foo() 15 mock.foo()
16 16
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 mock.bar = simple_mock.MockObject(mock) 75 mock.bar = simple_mock.MockObject(mock)
76 76
77 mock.ExpectCall('foo').WithArgs(_, 4) 77 mock.ExpectCall('foo').WithArgs(_, 4)
78 mock.bar.ExpectCall('baz') 78 mock.bar.ExpectCall('baz')
79 79
80 self.assertRaises( 80 self.assertRaises(
81 Exception, 81 Exception,
82 lambda: mock.bar.baz()) # pylint: disable=W0108 82 lambda: mock.bar.baz()) # pylint: disable=W0108
83 83
84 84
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/test/simple_mock.py ('k') | tools/telemetry/telemetry/test/system_stub.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698