summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncore.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-10-14 15:05:38 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-10-14 15:05:38 (GMT)
commitb1c54967381062bccef7db574b8e84f48a0eca76 (patch)
tree61af78425836dcb0891283994152df9c0e1b6556 /Lib/test/test_asyncore.py
parentf4061dac607d9bc2b3af0b72da5e8917428d869e (diff)
downloadcpython-b1c54967381062bccef7db574b8e84f48a0eca76.zip
cpython-b1c54967381062bccef7db574b8e84f48a0eca76.tar.gz
cpython-b1c54967381062bccef7db574b8e84f48a0eca76.tar.bz2
Issue #7523: Add SOCK_CLOEXEC and SOCK_NONBLOCK to the socket module,
where supported by the system. Patch by Nikita Vetoshkin.
Diffstat (limited to 'Lib/test/test_asyncore.py')
-rw-r--r--Lib/test/test_asyncore.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_asyncore.py b/Lib/test/test_asyncore.py
index 205efb9..f2ec8b8 100644
--- a/Lib/test/test_asyncore.py
+++ b/Lib/test/test_asyncore.py
@@ -692,7 +692,8 @@ class BaseTestAPI(unittest.TestCase):
s = asyncore.dispatcher()
s.create_socket(socket.AF_INET, socket.SOCK_STREAM)
self.assertEqual(s.socket.family, socket.AF_INET)
- self.assertEqual(s.socket.type, socket.SOCK_STREAM)
+ SOCK_NONBLOCK = getattr(socket, 'SOCK_NONBLOCK', 0)
+ self.assertEqual(s.socket.type, socket.SOCK_STREAM | SOCK_NONBLOCK)
def test_bind(self):
s1 = asyncore.dispatcher()