diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-10 03:29:33 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-01-10 03:29:33 (GMT) |
commit | af5b688f7149edd2d4aa6e8f5df149f24a5a083b (patch) | |
tree | 89f40a3a8c9f327bda25dc1a1aee6af050811942 /Lib | |
parent | 9e97071fe0d3c3afe791148f7ddc884855db3762 (diff) | |
parent | 47236db1d0ab08a231fde5bb620805da5a9c6d47 (diff) | |
download | cpython-af5b688f7149edd2d4aa6e8f5df149f24a5a083b.zip cpython-af5b688f7149edd2d4aa6e8f5df149f24a5a083b.tar.gz cpython-af5b688f7149edd2d4aa6e8f5df149f24a5a083b.tar.bz2 |
#16896: merge with 3.3.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_asyncore.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py index bdb3dc0..19b902b 100644 --- a/Lib/test/test_asyncore.py +++ b/Lib/test/test_asyncore.py @@ -513,7 +513,7 @@ class BaseClient(BaseTestHandler): pass -class BaseTestAPI(unittest.TestCase): +class BaseTestAPI: def tearDown(self): asyncore.close_all() @@ -821,34 +821,26 @@ class TestAPI_UseUnixSockets(BaseTestAPI): unlink(self.addr) BaseTestAPI.tearDown(self) -class TestAPI_UseIPv4Select(TestAPI_UseIPv4Sockets): +class TestAPI_UseIPv4Select(TestAPI_UseIPv4Sockets, unittest.TestCase): use_poll = False @unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required') -class TestAPI_UseIPv4Poll(TestAPI_UseIPv4Sockets): +class TestAPI_UseIPv4Poll(TestAPI_UseIPv4Sockets, unittest.TestCase): use_poll = True -class TestAPI_UseIPv6Select(TestAPI_UseIPv6Sockets): +class TestAPI_UseIPv6Select(TestAPI_UseIPv6Sockets, unittest.TestCase): use_poll = False @unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required') -class TestAPI_UseIPv6Poll(TestAPI_UseIPv6Sockets): +class TestAPI_UseIPv6Poll(TestAPI_UseIPv6Sockets, unittest.TestCase): use_poll = True -class TestAPI_UseUnixSocketsSelect(TestAPI_UseUnixSockets): +class TestAPI_UseUnixSocketsSelect(TestAPI_UseUnixSockets, unittest.TestCase): use_poll = False @unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required') -class TestAPI_UseUnixSocketsPoll(TestAPI_UseUnixSockets): +class TestAPI_UseUnixSocketsPoll(TestAPI_UseUnixSockets, unittest.TestCase): use_poll = True -def test_main(): - tests = [HelperFunctionTests, DispatcherTests, DispatcherWithSendTests, - DispatcherWithSendTests_UsePoll, FileWrapperTest, - TestAPI_UseIPv4Select, TestAPI_UseIPv4Poll, TestAPI_UseIPv6Select, - TestAPI_UseIPv6Poll, TestAPI_UseUnixSocketsSelect, - TestAPI_UseUnixSocketsPoll] - run_unittest(*tests) - if __name__ == "__main__": - test_main() + unittest.main() |