mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Follow-up of r67300: correct a failure in socket.makefile().
SocketIO objects now always have 'name' and 'mode' attributes.
This commit is contained in:
parent
304da21138
commit
9d24ff027f
2 changed files with 16 additions and 5 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue