Commit Graph

13 Commits (a8317c2393b5986b9afbfb20e378c16cbb096582)

Author SHA1 Message Date
Alex Willmer a8317c2393 tests: Remove unittest2, use stdlib unittest
unittest2 is incomplatible with Python 3.10
2 years ago
Alex Willmer 4b39013ef4 tests: Compatiblity shim for threading.Thread.is_alive()
On Python >= 3.8 thread.isAlive() is deprecated (removed in Python 3.9.
On Python <= 2.5 thread.is_alive() isn't present (added in Python 2.6).
3 years ago
David Wilson 8026e54b9b tests: move affinity_test to Ansible tests. 5 years ago
David Wilson e77048ec2d utils: pad out reset_affinity() and integrate with detach_popen() 5 years ago
David Wilson 25bffc424d issue #477: util/fakessh/two_three_compat fixes. 5 years ago
David Wilson 8a0b343760 issue #406: test for FD leak after every TestCase 6 years ago
Alex Willmer 03be0afeeb tests: Add tests of mitogen.utils.cast() 6 years ago
Alex Willmer 7e01c5bed5 Import and use unittest2 without aliasing it 6 years ago
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.
6 years ago
Alex Willmer 17da6e9998 Use unittest2 in all tests
This allows using features such as TestCase,assertIsInstance on Python
2.6 and earlier.
6 years ago
David Wilson bee1a86aa1 Let utils_test run directly too. 6 years ago
Alex Willmer d706b7d6b8 Update lingering references to with_broker & run_with_broker
A previous commit renamed run_with_broker() and with_broker() to
run_with_router() and with_router() respctively. Some references were
missed.
6 years ago
David Wilson e7ff6259a3 Initial commit. 6 years ago