Commit Graph

15 Commits

Author SHA1 Message Date
Alex Willmer 110eba05ce Import and use unittest2 without aliasing it 2017-11-12 12:42:27 +00:00
Alex Willmer 81a77a453a 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.
2017-11-11 23:08:08 +00:00
Alex Willmer 9351a44784 Use unittest2 in all tests
This allows using features such as TestCase,assertIsInstance on Python
2.6 and earlier.
2017-11-11 22:59:38 +00:00
David Wilson 8439e889ed 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.
2017-10-03 16:35:12 +05:30
David Wilson 1784f3c83a Add test that hangs the main thread during shutdown. 2017-10-03 16:09:35 +05:30
David Wilson fa9def91f2 Implement test_aborted_on_local_context_disconnect 2017-10-03 15:54:55 +05:30
David Wilson 2659cf0ae0 Use enhanced assertRaises in call_function_test.py. 2017-09-30 20:57:14 +05:30
David Wilson b0e13fefdd Fix 2 call_function_test failures. 2017-09-30 15:09:05 +05:30
David Wilson d553295135 Syntax error. 2017-09-22 13:37:50 +05:30
David Wilson 5da8dc0cdc Allow running without py.test. 2017-09-21 16:45:36 +05:30
David Wilson aa5bc53f6d Update test. 2017-09-21 13:41:47 +05:30
David Wilson 8f08aa4fc8 Tidy up test. 2017-09-16 20:00:57 +05:30
David Wilson 066b39d570 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.
2017-09-16 19:57:16 +05:30
David Wilson 1888c5c660 Add some broken tests 2017-09-16 15:34:55 +05:30
David Wilson 4e51f516a6 Add call_function_test, fix various exception bugs. 2017-09-16 15:27:30 +05:30