Commit Graph

15 Commits

Author SHA1 Message Date
Alex Willmer 7e01c5bed5 Import and use unittest2 without aliasing it 2018-03-19 21:58:28 +05:45
Alex Willmer e8e023ce59 Use specific TestCase assertions throughout tests
e.g. assert x == y -> self.assertEqual(x, y);
self.assertTrue(isinstance(x, y)) -> self.assertIsInstance(x, y)

These specific methods give more useful errors in the case of a test
failure.
2018-03-19 21:58:28 +05:45
Alex Willmer 17da6e9998 Use unittest2 in all tests
This allows using features such as TestCase,assertIsInstance on Python
2.6 and earlier.
2018-03-19 21:58:27 +05:45
David Wilson b7a9aa46cf core: More robust shutdown
Now there is a separate SHUTDOWN message that relies only on being
received by the broker thread, the main thread can be hung horribly and
the process will still eventually receive a SIGTERM.
2018-03-19 21:35:37 +05:45
David Wilson 32d029ed75 Add test that hangs the main thread during shutdown. 2018-03-19 21:35:37 +05:45
David Wilson 3285fc2f75 Implement test_aborted_on_local_context_disconnect 2018-03-19 21:35:37 +05:45
David Wilson 118fe01be5 Use enhanced assertRaises in call_function_test.py. 2018-03-19 21:35:37 +05:45
David Wilson 9b13a4cc61 Fix 2 call_function_test failures. 2018-03-19 21:35:37 +05:45
David Wilson 2fed3613e9 Syntax error. 2018-03-19 21:35:36 +05:45
David Wilson f01e457d70 Allow running without py.test. 2018-03-19 21:35:35 +05:45
David Wilson 3c8c1f71a6 Update test. 2018-03-19 21:35:35 +05:45
David Wilson bdf4fcfbce Tidy up test. 2018-03-19 21:35:17 +05:45
David Wilson be9e55fe8c pickle: support Context(), use same unpickler everywhere.
* Support passing Context() objects in function calls and return values.
  Now the fakessh demo from the documentation index would work
  correctly.

* Since slaves can communicate with each other now, they should also use
  the same approach to unpickling as the master already used. Collapse
  away all the unpickle extension crap and hard-wire just the 3 types
  that support unpickling.
2018-03-19 21:35:17 +05:45
David Wilson 996d847731 Add some broken tests 2018-03-19 21:35:17 +05:45
David Wilson e75f1d8579 Add call_function_test, fix various exception bugs. 2018-03-19 21:35:17 +05:45