[Python-checkins] cpython (2.7): Skip expr* tests for large integers for Tcl <8.5.

serhiy.storchaka python-checkins at python.org
Mon Feb 3 21:32:51 CET 2014


http://hg.python.org/cpython/rev/aed29f86bfdc
changeset:   88943:aed29f86bfdc
branch:      2.7
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Mon Feb 03 22:30:22 2014 +0200
summary:
  Skip expr* tests for large integers for Tcl <8.5.
The '**' operator is available only since 8.5 and in any case such large
integers are not supported on Tcl <8.5.

files:
  Lib/test/test_tcl.py |  12 ++++++++----
  1 files changed, 8 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -215,7 +215,6 @@
         self.assertRaises(TclError, tcl.exprstring, 'spam')
         check('', '0')
         check('8.2 + 6', '14.2')
-        check('2**64', str(2**64))
         check('3.1 + $a', '6.1')
         check('2 + "$a.$b"', '5.6')
         check('4*[llength "6 2"]', '8')
@@ -233,6 +232,8 @@
         check('"a\xc2\xbd\xe2\x82\xac"', 'a\xc2\xbd\xe2\x82\xac')
         check(r'"a\xbd\u20ac"', 'a\xc2\xbd\xe2\x82\xac')
         check(r'"a\0b"', 'a\xc0\x80b')
+        if tcl_version >= (8, 5):
+            check('2**64', str(2**64))
 
     def test_exprdouble(self):
         tcl = self.interp
@@ -248,7 +249,6 @@
         self.assertRaises(TclError, tcl.exprdouble, 'spam')
         check('', 0.0)
         check('8.2 + 6', 14.2)
-        check('2**64', float(2**64))
         check('3.1 + $a', 6.1)
         check('2 + "$a.$b"', 5.6)
         check('4*[llength "6 2"]', 8.0)
@@ -263,6 +263,8 @@
         check('[string length "a\xc2\xbd\xe2\x82\xac"]', 3.0)
         check(r'[string length "a\xbd\u20ac"]', 3.0)
         self.assertRaises(TclError, tcl.exprdouble, '"abc"')
+        if tcl_version >= (8, 5):
+            check('2**64', float(2**64))
 
     def test_exprlong(self):
         tcl = self.interp
@@ -278,7 +280,6 @@
         self.assertRaises(TclError, tcl.exprlong, 'spam')
         check('', 0)
         check('8.2 + 6', 14)
-        self.assertRaises(TclError, tcl.exprlong, '2**64')
         check('3.1 + $a', 6)
         check('2 + "$a.$b"', 5)
         check('4*[llength "6 2"]', 8)
@@ -293,6 +294,8 @@
         check('[string length "a\xc2\xbd\xe2\x82\xac"]', 3)
         check(r'[string length "a\xbd\u20ac"]', 3)
         self.assertRaises(TclError, tcl.exprlong, '"abc"')
+        if tcl_version >= (8, 5):
+            self.assertRaises(TclError, tcl.exprlong, '2**64')
 
     def test_exprboolean(self):
         tcl = self.interp
@@ -317,7 +320,6 @@
             check('"%s"' % value, True)
             check('{%s}' % value, True)
         check('8.2 + 6', True)
-        check('2**64', True)
         check('3.1 + $a', True)
         check('2 + "$a.$b"', True)
         check('4*[llength "6 2"]', True)
@@ -332,6 +334,8 @@
         check('[string length "a\xc2\xbd\xe2\x82\xac"]', True)
         check(r'[string length "a\xbd\u20ac"]', True)
         self.assertRaises(TclError, tcl.exprboolean, '"abc"')
+        if tcl_version >= (8, 5):
+            check('2**64', True)
 
     def test_passing_values(self):
         def passValue(value):

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list