mirror of
https://github.com/python/cpython.git
synced 2025-10-20 13:43:01 +00:00
#16896: merge with 3.3.
This commit is contained in:
commit
af5b688f71
2 changed files with 11 additions and 16 deletions
|
@ -513,7 +513,7 @@ class BaseClient(BaseTestHandler):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class BaseTestAPI(unittest.TestCase):
|
class BaseTestAPI:
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
asyncore.close_all()
|
asyncore.close_all()
|
||||||
|
@ -821,34 +821,26 @@ class TestAPI_UseUnixSockets(BaseTestAPI):
|
||||||
unlink(self.addr)
|
unlink(self.addr)
|
||||||
BaseTestAPI.tearDown(self)
|
BaseTestAPI.tearDown(self)
|
||||||
|
|
||||||
class TestAPI_UseIPv4Select(TestAPI_UseIPv4Sockets):
|
class TestAPI_UseIPv4Select(TestAPI_UseIPv4Sockets, unittest.TestCase):
|
||||||
use_poll = False
|
use_poll = False
|
||||||
|
|
||||||
@unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required')
|
@unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required')
|
||||||
class TestAPI_UseIPv4Poll(TestAPI_UseIPv4Sockets):
|
class TestAPI_UseIPv4Poll(TestAPI_UseIPv4Sockets, unittest.TestCase):
|
||||||
use_poll = True
|
use_poll = True
|
||||||
|
|
||||||
class TestAPI_UseIPv6Select(TestAPI_UseIPv6Sockets):
|
class TestAPI_UseIPv6Select(TestAPI_UseIPv6Sockets, unittest.TestCase):
|
||||||
use_poll = False
|
use_poll = False
|
||||||
|
|
||||||
@unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required')
|
@unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required')
|
||||||
class TestAPI_UseIPv6Poll(TestAPI_UseIPv6Sockets):
|
class TestAPI_UseIPv6Poll(TestAPI_UseIPv6Sockets, unittest.TestCase):
|
||||||
use_poll = True
|
use_poll = True
|
||||||
|
|
||||||
class TestAPI_UseUnixSocketsSelect(TestAPI_UseUnixSockets):
|
class TestAPI_UseUnixSocketsSelect(TestAPI_UseUnixSockets, unittest.TestCase):
|
||||||
use_poll = False
|
use_poll = False
|
||||||
|
|
||||||
@unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required')
|
@unittest.skipUnless(hasattr(select, 'poll'), 'select.poll required')
|
||||||
class TestAPI_UseUnixSocketsPoll(TestAPI_UseUnixSockets):
|
class TestAPI_UseUnixSocketsPoll(TestAPI_UseUnixSockets, unittest.TestCase):
|
||||||
use_poll = True
|
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__":
|
if __name__ == "__main__":
|
||||||
test_main()
|
unittest.main()
|
||||||
|
|
|
@ -614,6 +614,9 @@ Tests
|
||||||
|
|
||||||
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
|
- Issue #16836: Enable IPv6 support even if IPv6 is disabled on the build host.
|
||||||
|
|
||||||
|
- Issue #16896: test_asyncore now works with unittest test discovery.
|
||||||
|
Patch by Zachary Ware.
|
||||||
|
|
||||||
- Issue #16897: test_bisect now works with unittest test discovery.
|
- Issue #16897: test_bisect now works with unittest test discovery.
|
||||||
Initial patch by Zachary Ware.
|
Initial patch by Zachary Ware.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue