| OLD | NEW |
| 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=E0611,F0401 | 7 # pylint: disable=E0611,F0401 |
| 8 import mojo.embedder | 8 import mojo_embedder |
| 9 import mojo.system | 9 import mojo_system |
| 10 | 10 |
| 11 | 11 |
| 12 class MojoTestCase(unittest.TestCase): | 12 class MojoTestCase(unittest.TestCase): |
| 13 def __init__(self, *args, **kwargs): | 13 def __init__(self, *args, **kwargs): |
| 14 unittest.TestCase.__init__(self, *args, **kwargs) | 14 unittest.TestCase.__init__(self, *args, **kwargs) |
| 15 self.loop = None | 15 self.loop = None |
| 16 | 16 |
| 17 def run(self, *args, **kwargs): | 17 def run(self, *args, **kwargs): |
| 18 try: | 18 try: |
| 19 mojo.embedder.Init() | 19 mojo_embedder.Init() |
| 20 self.loop = mojo.system.RunLoop() | 20 self.loop = mojo_system.RunLoop() |
| 21 unittest.TestCase.run(self, *args, **kwargs) | 21 unittest.TestCase.run(self, *args, **kwargs) |
| 22 finally: | 22 finally: |
| 23 self.loop = None | 23 self.loop = None |
| 24 assert mojo.embedder.ShutdownForTest() | 24 assert mojo_embedder.ShutdownForTest() |
| OLD | NEW |