summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorEric V. Smith <eric@trueblade.com>2014-04-15 07:05:02 (GMT)
committerEric V. Smith <eric@trueblade.com>2014-04-15 07:05:02 (GMT)
commita0d107324d38ab6fc5af4c6fee272e1097f98f49 (patch)
treeaed38f812bcc7556a1899b4756e7af94fd909ab4 /Lib
parent9417764e0164711886ee5416204b59ec47ef54c7 (diff)
downloadcpython-a0d107324d38ab6fc5af4c6fee272e1097f98f49.zip
cpython-a0d107324d38ab6fc5af4c6fee272e1097f98f49.tar.gz
cpython-a0d107324d38ab6fc5af4c6fee272e1097f98f49.tar.bz2
Closed issue #8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_types.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index ec10752..11d9546 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -343,6 +343,8 @@ class TypesTests(unittest.TestCase):
self.assertRaises(ValueError, 3 .__format__, ",n")
# can't have ',' with 'c'
self.assertRaises(ValueError, 3 .__format__, ",c")
+ # can't have '#' with 'c'
+ self.assertRaises(ValueError, 3 .__format__, "#c")
# ensure that only int and float type specifiers work
for format_spec in ([chr(x) for x in range(ord('a'), ord('z')+1)] +