diff options
Diffstat (limited to 'tests/test_callback.py')
-rw-r--r-- | tests/test_callback.py | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/tests/test_callback.py b/tests/test_callback.py deleted file mode 100644 index 58f787b..0000000 --- a/tests/test_callback.py +++ /dev/null @@ -1,38 +0,0 @@ -import tests - -class CallbackTests(tests.TestCase): - def test_hello_world(self): - result = [] - - def hello_world(loop): - result.append('Hello World') - loop.stop() - - self.loop.call_soon(hello_world, self.loop) - self.loop.run_forever() - self.assertEqual(result, ['Hello World']) - - def test_soon_stop_soon(self): - result = [] - - def hello(): - result.append("Hello") - - def world(): - result.append("World") - self.loop.stop() - - self.loop.call_soon(hello) - self.loop.stop() - self.loop.call_soon(world) - - self.loop.run_forever() - self.assertEqual(result, ["Hello"]) - - self.loop.run_forever() - self.assertEqual(result, ["Hello", "World"]) - - -if __name__ == '__main__': - import unittest - unittest.main() |