Follow-up of r67300: correct a failure in socket.makefile().

SocketIO objects now always have 'name' and 'mode' attributes.
This commit is contained in:
Amaury Forgeot d'Arc 2008-11-20 23:15:52 +00:00
parent 304da21138
commit 9d24ff027f
2 changed files with 16 additions and 5 deletions

View file

@ -848,6 +848,14 @@ class FileObjectClassTestCase(SocketConnectedTest):
def _testClosedAttr(self):
self.assert_(not self.cli_file.closed)
def testAttributes(self):
self.assertEqual(self.serv_file.mode, 'r')
self.assertEqual(self.serv_file.name, self.cli_conn.fileno())
def _testAttributes(self):
self.assertEqual(self.cli_file.mode, 'w')
self.assertEqual(self.cli_file.name, self.serv_conn.fileno())
class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase):
"""Repeat the tests from FileObjectClassTestCase with bufsize==0.