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

Side by Side Diff: mojo/python/tests/promise_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 unittest 5 import unittest
6 6
7 # pylint: disable=F0401 7 # pylint: disable=F0401
8 from mojo.bindings import promise 8 from mojo_bindings import promise
9 9
10 10
11 class PromiseTest(unittest.TestCase): 11 class PromiseTest(unittest.TestCase):
12 12
13 def setUp(self): 13 def setUp(self):
14 self.accumulated = [] 14 self.accumulated = []
15 15
16 def _AddToAccumulated(self, res): 16 def _AddToAccumulated(self, res):
17 self.accumulated.append(res) 17 self.accumulated.append(res)
18 return res 18 return res
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 functions = {} 172 functions = {}
173 def GeneratorFunction(resolve, reject): 173 def GeneratorFunction(resolve, reject):
174 functions['resolve'] = resolve 174 functions['resolve'] = resolve
175 functions['reject'] = reject 175 functions['reject'] = reject
176 p = promise.Promise(GeneratorFunction) 176 p = promise.Promise(GeneratorFunction)
177 return (p, functions['resolve'], functions['reject']) 177 return (p, functions['resolve'], functions['reject'])
178 178
179 179
180 def _ThrowException(x): 180 def _ThrowException(x):
181 raise RuntimeError(x) 181 raise RuntimeError(x)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698