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

Side by Side Diff: mojo/python/tests/async_wait_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 class AsyncWaitTest(mojo_unittest.MojoTestCase): 11 class AsyncWaitTest(mojo_unittest.MojoTestCase):
12 12
13 def setUp(self): 13 def setUp(self):
14 super(AsyncWaitTest, self).setUp() 14 super(AsyncWaitTest, self).setUp()
15 self.array = [] 15 self.array = []
16 self.handles = system.MessagePipe() 16 self.handles = system.MessagePipe()
17 self.cancel = self.handles.handle0.AsyncWait(system.HANDLE_SIGNAL_READABLE, 17 self.cancel = self.handles.handle0.AsyncWait(system.HANDLE_SIGNAL_READABLE,
18 system.DEADLINE_INDEFINITE, 18 system.DEADLINE_INDEFINITE,
(...skipping 22 matching lines...) Expand all
41 41
42 def testAsyncWaitCancel(self): 42 def testAsyncWaitCancel(self):
43 self.loop.PostDelayedTask(self.cancel, 0) 43 self.loop.PostDelayedTask(self.cancel, 0)
44 self._PostWriteAndRun() 44 self._PostWriteAndRun()
45 self.assertEquals(len(self.array), 0) 45 self.assertEquals(len(self.array), 0)
46 46
47 def testAsyncWaitImmediateCancel(self): 47 def testAsyncWaitImmediateCancel(self):
48 self.cancel() 48 self.cancel()
49 self._PostWriteAndRun() 49 self._PostWriteAndRun()
50 self.assertEquals(len(self.array), 0) 50 self.assertEquals(len(self.array), 0)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698