| Index: mojo/python/tests/mojo_unittest.py
|
| diff --git a/mojo/python/tests/mojo_unittest.py b/mojo/python/tests/mojo_unittest.py
|
| index 101f19c74aa1c3aeb3ff68caf6d5f06a4c3d05ce..f80ffacf1972d1496fa049b0d20d7dcbc1095655 100644
|
| --- a/mojo/python/tests/mojo_unittest.py
|
| +++ b/mojo/python/tests/mojo_unittest.py
|
| @@ -10,11 +10,15 @@ import mojo.system
|
|
|
|
|
| class MojoTestCase(unittest.TestCase):
|
| -
|
| - def setUp(self):
|
| - mojo.embedder.Init()
|
| - self.loop = mojo.system.RunLoop()
|
| -
|
| - def tearDown(self):
|
| + def __init__(self, *args, **kwargs):
|
| + unittest.TestCase.__init__(self, *args, **kwargs)
|
| self.loop = None
|
| - assert mojo.embedder.ShutdownForTest()
|
| +
|
| + def run(self, *args, **kwargs):
|
| + try:
|
| + mojo.embedder.Init()
|
| + self.loop = mojo.system.RunLoop()
|
| + unittest.TestCase.run(self, *args, **kwargs)
|
| + finally:
|
| + self.loop = None
|
| + assert mojo.embedder.ShutdownForTest()
|
|
|