[Python-checkins] python/dist/src/Lib/test test_array.py,1.25,1.26

montanaro at users.sourceforge.net montanaro at users.sourceforge.net
Sun Aug 3 17:30:43 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv6847

Modified Files:
	test_array.py 
Log Message:
protect against test problems with Jython


Index: test_array.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_array.py,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** test_array.py	3 Aug 2003 23:02:10 -0000	1.25
--- test_array.py	3 Aug 2003 23:30:40 -0000	1.26
***************
*** 603,612 ****
      def test_bug_782369(self):
          import sys
!         for i in range(10):
!             b = array.array('B', range(64))
!         rc = sys.getrefcount(10)
!         for i in range(10):
!             b = array.array('B', range(64))
!         self.assertEqual(rc, sys.getrefcount(10))
  
  class StringTest(BaseTest):
--- 603,613 ----
      def test_bug_782369(self):
          import sys
!         if hasattr(sys, "getrefcount"):
!             for i in range(10):
!                 b = array.array('B', range(64))
!             rc = sys.getrefcount(10)
!             for i in range(10):
!                 b = array.array('B', range(64))
!             self.assertEqual(rc, sys.getrefcount(10))
  
  class StringTest(BaseTest):





More information about the Python-checkins mailing list