summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-03 20:31:09 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-03 20:31:09 (GMT)
commit160f8924ac53f330aa1cad5d63c1351cb844073e (patch)
treea24ca86ba392cc7b17d6366ca128a43cd96efbe0 /Lib
parentd2cc743ca448866197b4ac0bcb918591827f4552 (diff)
downloadcpython-160f8924ac53f330aa1cad5d63c1351cb844073e.zip
cpython-160f8924ac53f330aa1cad5d63c1351cb844073e.tar.gz
cpython-160f8924ac53f330aa1cad5d63c1351cb844073e.tar.bz2
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.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_tcl.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index 308751d..3693dfe 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -205,7 +205,6 @@ class TclTest(unittest.TestCase):
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')
@@ -223,6 +222,8 @@ class TclTest(unittest.TestCase):
check('"a\xbd\u20ac"', 'a\xbd\u20ac')
check(r'"a\xbd\u20ac"', 'a\xbd\u20ac')
check(r'"a\0b"', 'a\x00b')
+ if tcl_version >= (8, 5):
+ check('2**64', str(2**64))
def test_exprdouble(self):
tcl = self.interp
@@ -239,7 +240,6 @@ class TclTest(unittest.TestCase):
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)
@@ -254,6 +254,8 @@ class TclTest(unittest.TestCase):
check('[string length "a\xbd\u20ac"]', 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
@@ -270,7 +272,6 @@ class TclTest(unittest.TestCase):
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)
@@ -285,6 +286,8 @@ class TclTest(unittest.TestCase):
check('[string length "a\xbd\u20ac"]', 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
@@ -310,7 +313,6 @@ class TclTest(unittest.TestCase):
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)
@@ -325,6 +327,8 @@ class TclTest(unittest.TestCase):
check('[string length "a\xbd\u20ac"]', 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):