[Python-checkins] python/dist/src/Lib/test test_socket.py, 1.67, 1.68

tim_one at users.sourceforge.net tim_one at users.sourceforge.net
Sat Mar 27 21:20:47 EST 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3895/lib/test

Modified Files:
	test_socket.py 
Log Message:
SF bug 924242: socket._fileobject._getclosed() returns wrong value

The .closed property always returned the wrong result.

Bugfix candidate!


Index: test_socket.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_socket.py,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** test_socket.py	10 Feb 2004 15:51:15 -0000	1.67
--- test_socket.py	28 Mar 2004 02:20:45 -0000	1.68
***************
*** 591,594 ****
--- 591,595 ----
      def tearDown(self):
          self.serv_file.close()
+         self.assert_(self.serv_file.closed)
          self.serv_file = None
          SocketConnectedTest.tearDown(self)
***************
*** 600,603 ****
--- 601,605 ----
      def clientTearDown(self):
          self.cli_file.close()
+         self.assert_(self.cli_file.closed)
          self.cli_file = None
          SocketConnectedTest.clientTearDown(self)
***************
*** 646,649 ****
--- 648,657 ----
          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):
  




More information about the Python-checkins mailing list