diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-11-20 23:15:52 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2008-11-20 23:15:52 (GMT) |
commit | 9d24ff027fe93e702d95d95dd520096d4c5a9fc2 (patch) | |
tree | f8bfa79c552858445f7bb8284c6b41b8dfe5e3ef /Lib/test/test_socket.py | |
parent | 304da2113892eb1a96c7976b44891bb3396c8adc (diff) | |
download | cpython-9d24ff027fe93e702d95d95dd520096d4c5a9fc2.zip cpython-9d24ff027fe93e702d95d95dd520096d4c5a9fc2.tar.gz cpython-9d24ff027fe93e702d95d95dd520096d4c5a9fc2.tar.bz2 |
Follow-up of r67300: correct a failure in socket.makefile().
SocketIO objects now always have 'name' and 'mode' attributes.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r-- | Lib/test/test_socket.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 9d753b7..b2323fe 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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. |