diff options
author | Tim Peters <tim.peters@gmail.com> | 2004-03-28 02:20:45 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2004-03-28 02:20:45 (GMT) |
commit | 116d83ce710d4494a4d401edb6983aceef45b901 (patch) | |
tree | 3f08f60a7c2d7d07b77280ed4b836526fc557404 /Lib/test/test_socket.py | |
parent | 165163f245b702f8011120bb5ce544f7c79fd461 (diff) | |
download | cpython-116d83ce710d4494a4d401edb6983aceef45b901.zip cpython-116d83ce710d4494a4d401edb6983aceef45b901.tar.gz cpython-116d83ce710d4494a4d401edb6983aceef45b901.tar.bz2 |
SF bug 924242: socket._fileobject._getclosed() returns wrong value
The .closed property always returned the wrong result.
Bugfix candidate!
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 a2b8489..f7bf041 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -590,6 +590,7 @@ class FileObjectClassTestCase(SocketConnectedTest): def tearDown(self): self.serv_file.close() + self.assert_(self.serv_file.closed) self.serv_file = None SocketConnectedTest.tearDown(self) @@ -599,6 +600,7 @@ class FileObjectClassTestCase(SocketConnectedTest): def clientTearDown(self): self.cli_file.close() + self.assert_(self.cli_file.closed) self.cli_file = None SocketConnectedTest.clientTearDown(self) @@ -645,6 +647,12 @@ class FileObjectClassTestCase(SocketConnectedTest): self.cli_file.write(MSG) self.cli_file.flush() + def testClosedAttr(self): + self.assert_(not self.serv_file.closed) + + def _testClosedAttr(self): + self.assert_(not self.cli_file.closed) + class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase): """Repeat the tests from FileObjectClassTestCase with bufsize==0. |