Thomas Herve added the comment:

This is a nice enhancement. I attach a quick patch to add tests for that.

----------
nosy: +therve
Added file: http://bugs.python.org/file8872/1552_test_socket.diff

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1552>
__________________________________
Index: Lib/test/test_socket.py
===================================================================
--- Lib/test/test_socket.py     (revision 59319)
+++ Lib/test/test_socket.py     (working copy)
@@ -199,6 +199,8 @@
 
     def setUp(self):
         self.serv, self.cli = socket.socketpair()
+        self.assert_(isinstance(self.serv, socket.socket))
+        self.assert_(isinstance(self.cli, socket.socket))
 
     def tearDown(self):
         self.serv.close()
@@ -561,6 +563,7 @@
             return # On Windows, this doesn't exist
         fd = self.cli_conn.fileno()
         sock = socket.fromfd(fd, socket.AF_INET, socket.SOCK_STREAM)
+        self.assert_(isinstance(sock, socket.socket))
         msg = sock.recv(1024)
         self.assertEqual(msg, MSG)
 
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to