summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-24 18:07:05 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2008-04-24 18:07:05 (GMT)
commit5216721a532c348bcc59a03c7ee206f2cb2ae497 (patch)
treed6d54b8cd3713662351f829f71e8d5eb529b4d8d /Lib/test/test_compile.py
parent11034c6c167c238d32fdba66300d496364a6d366 (diff)
downloadcpython-5216721a532c348bcc59a03c7ee206f2cb2ae497.zip
cpython-5216721a532c348bcc59a03c7ee206f2cb2ae497.tar.gz
cpython-5216721a532c348bcc59a03c7ee206f2cb2ae497.tar.bz2
Issue2681: the literal 0o8 was wrongly accepted, and evaluated as float(0.0).
This happened only when 8 is the first digit. Credits go to Lukas Meuser.
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index e8695ac..e2a0ebe 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -183,7 +183,7 @@ if 1:
for arg in ["077787", "0xj", "0x.", "0e", "090000000000000",
"080000000000000", "000000000000009", "000000000000008",
"0b42", "0BADCAFE", "0o123456789", "0b1.1", "0o4.2",
- "0b101j2", "0o153j2", "0b100e1", "0o777e1"]:
+ "0b101j2", "0o153j2", "0b100e1", "0o777e1", "0o8", "0o78"]:
self.assertRaises(SyntaxError, eval, arg)
self.assertEqual(eval("0777"), 511)