[Python-checkins] CVS: python/dist/src/Lib/test test_unary.py,1.1,1.2

Tim Peters tim_one@users.sourceforge.net
2001年8月27日 14:45:34 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv6554/python/Lib/test
Modified Files:
	test_unary.py 
Log Message:
Change test_overflow to test_no_overflow; looks like big int literals
are auto-coerced to longs now, but this test still expected OverflowError.
I can't imagine this test failure was unique to Windows.
Index: test_unary.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_unary.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_unary.py	2001年08月12日 02:22:27	1.1
--- test_unary.py	2001年08月27日 21:45:32	1.2
***************
*** 28,35 ****
 self.assert_(-2L == 0 - 2L)
 
! def test_overflow(self):
! self.assertRaises(OverflowError, eval, "+" + ("9" * 32))
! self.assertRaises(OverflowError, eval, "-" + ("9" * 32))
! self.assertRaises(OverflowError, eval, "~" + ("9" * 32))
 
 def test_bad_types(self):
--- 28,36 ----
 self.assert_(-2L == 0 - 2L)
 
! def test_no_overflow(self):
! nines = "9" * 32
! self.assert_(eval("+" + nines) == eval("+" + nines + "L"))
! self.assert_(eval("-" + nines) == eval("-" + nines + "L"))
! self.assert_(eval("~" + nines) == eval("~" + nines + "L"))
 
 def test_bad_types(self):

AltStyle によって変換されたページ (->オリジナル) /