diff options
author | Eric V. Smith <eric@trueblade.com> | 2014-04-16 02:37:55 (GMT) |
---|---|---|
committer | Eric V. Smith <eric@trueblade.com> | 2014-04-16 02:37:55 (GMT) |
commit | a12572ff3a62878f70cfb8fd4cf8c6bc4ac1ba98 (patch) | |
tree | 3d395e27f831e78b5e9831ea1e855d4e125c303d /Lib/test/test_types.py | |
parent | 15b04eb42902f84fa3e35387b0c7c3391a204f65 (diff) | |
download | cpython-a12572ff3a62878f70cfb8fd4cf8c6bc4ac1ba98.zip cpython-a12572ff3a62878f70cfb8fd4cf8c6bc4ac1ba98.tar.gz cpython-a12572ff3a62878f70cfb8fd4cf8c6bc4ac1ba98.tar.bz2 |
Close issue #8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
Diffstat (limited to 'Lib/test/test_types.py')
-rw-r--r-- | Lib/test/test_types.py | 2 |
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)] + |