summaryrefslogtreecommitdiff
path: root/Demo/parser/test_unparse.py
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-06-29 08:52:36 +0000
committerMark Dickinson <dickinsm@gmail.com>2010-06-29 08:52:36 +0000
commit3eb0290346199a850bc0b001c3e15ea75fdfff8f (patch)
tree61b3003af77780f910785a0108fabff3f6747b2e /Demo/parser/test_unparse.py
parent82c8d93357016d81b051f50d394bce028576967f (diff)
downloadcpython-git-3eb0290346199a850bc0b001c3e15ea75fdfff8f.tar.gz
Add parentheses around numeric literals, to avoid turning 3 .bit_length() into 3.bit_length().
Diffstat (limited to 'Demo/parser/test_unparse.py')
-rw-r--r--Demo/parser/test_unparse.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Demo/parser/test_unparse.py b/Demo/parser/test_unparse.py
index 5832b8ffb7..0d138973b3 100644
--- a/Demo/parser/test_unparse.py
+++ b/Demo/parser/test_unparse.py
@@ -84,6 +84,9 @@ class UnparseTestCase(unittest.TestCase):
self.check_roundtrip("not True or False")
self.check_roundtrip("True or not False")
+ def test_integer_parens(self):
+ self.check_roundtrip("3 .__abs__()")
+
def test_chained_comparisons(self):
self.check_roundtrip("1 < 4 <= 5")
self.check_roundtrip("a is b is c is not d")