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

Side by Side Diff: mojo/python/tests/runloop_unittest.py

Issue 843523002: Delete empty mojo python package, and prefix all python packages with mojo_ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 mojo_unittest 5 import mojo_unittest
6 6
7 # pylint: disable=E0611 7 # pylint: disable=E0611
8 from mojo import system 8 import mojo_system as system
9 9
10 10
11 def _Increment(array): 11 def _Increment(array):
12 def _Closure(): 12 def _Closure():
13 array.append(0) 13 array.append(0)
14 return _Closure 14 return _Closure
15 15
16 16
17 class RunLoopTest(mojo_unittest.MojoTestCase): 17 class RunLoopTest(mojo_unittest.MojoTestCase):
18 18
(...skipping 13 matching lines...) Expand all
32 with self.assertRaisesRegexp(Exception, '^error$'): 32 with self.assertRaisesRegexp(Exception, '^error$'):
33 self.loop.Run() 33 self.loop.Run()
34 self.assertEquals(len(array), 0) 34 self.assertEquals(len(array), 0)
35 self.loop.RunUntilIdle() 35 self.loop.RunUntilIdle()
36 self.assertEquals(len(array), 1) 36 self.assertEquals(len(array), 1)
37 37
38 def testCurrent(self): 38 def testCurrent(self):
39 self.assertEquals(system.RunLoop.Current(), self.loop) 39 self.assertEquals(system.RunLoop.Current(), self.loop)
40 self.loop = None 40 self.loop = None
41 self.assertIsNone(system.RunLoop.Current()) 41 self.assertIsNone(system.RunLoop.Current())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698