diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-13 08:49:30 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-13 08:49:30 (GMT) |
| commit | 422794767bbd91f3807a483c7862189b2acc0c60 (patch) | |
| tree | 97947d9e7bbc8e060acf761333d90e9b28a612af /Lib/test/test_asyncio/test_events.py | |
| parent | 1392f68e0ed7d3367c851bbd5f4322679025be8c (diff) | |
| parent | 28773465e699b4a9a2e6411de80fb06d2652d3e3 (diff) | |
| download | cpython-422794767bbd91f3807a483c7862189b2acc0c60.zip cpython-422794767bbd91f3807a483c7862189b2acc0c60.tar.gz cpython-422794767bbd91f3807a483c7862189b2acc0c60.tar.bz2 | |
Merge heads
Diffstat (limited to 'Lib/test/test_asyncio/test_events.py')
| -rw-r--r-- | Lib/test/test_asyncio/test_events.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index d5d667a..4300ddd 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -1191,6 +1191,18 @@ class EventLoopTestsMixin: {'clock_resolution': self.loop._clock_resolution, 'selector': self.loop._selector.__class__.__name__}) + def test_sock_connect_address(self): + address = ('www.python.org', 80) + for family in (socket.AF_INET, socket.AF_INET6): + for sock_type in (socket.SOCK_STREAM, socket.SOCK_DGRAM): + sock = socket.socket(family, sock_type) + with sock: + connect = self.loop.sock_connect(sock, address) + with self.assertRaises(ValueError) as cm: + self.loop.run_until_complete(connect) + self.assertIn('address must be resolved', + str(cm.exception)) + class SubprocessTestsMixin: |
