summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2003-01-28 17:48:21 (GMT)
committerGuido van Rossum <guido@python.org>2003-01-28 17:48:21 (GMT)
commit53b39d2e70768e34c3f01f0d6efbe76c9913d422 (patch)
treea987a27662554c8dbd1b073ba18a04ca8ece467c
parent7871154c2ed5f8e9137b6b4a2fca1412bd3760be (diff)
downloadcpython-53b39d2e70768e34c3f01f0d6efbe76c9913d422.zip
cpython-53b39d2e70768e34c3f01f0d6efbe76c9913d422.tar.gz
cpython-53b39d2e70768e34c3f01f0d6efbe76c9913d422.tar.bz2
Verify treatment of unary minus on negative numbers SF bug #660455.
-rw-r--r--Lib/test/test_compile.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index c9a139b..3530457 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -132,3 +132,10 @@ expect_error("000000000000008") # plain octal literal w/ decimal digit
expect_same("000000000000007", 7)
expect_same("000000000000008.", 8.)
expect_same("000000000000009.", 9.)
+
+# Verify treatment of unary minus on negative numbers SF bug #660455
+import warnings
+warnings.filterwarnings("ignore", "hex/oct constants", FutureWarning)
+# XXX Of course the following test will have to be changed in Python 2.4
+expect_same("0xffffffff", -1)
+expect_same("-0xffffffff", 1)