summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_format_modulo.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/string_format_modulo.py')
-rw-r--r--tests/basics/string_format_modulo.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/basics/string_format_modulo.py b/tests/basics/string_format_modulo.py
index a1c31def90..05b00ef14f 100644
--- a/tests/basics/string_format_modulo.py
+++ b/tests/basics/string_format_modulo.py
@@ -86,3 +86,28 @@ try:
print("%(foo)*s" % {"foo": "bar"})
except TypeError:
print("TypeError")
+
+try:
+ '%(a' % {'a':1}
+except ValueError:
+ print('ValueError')
+
+try:
+ '%.*d %.*d' % (20, 5)
+except TypeError:
+ print('TypeError')
+
+try:
+ a = '%*' % 1
+except (ValueError):
+ print('ValueError')
+
+try:
+ '%c' % 'aa'
+except TypeError:
+ print('TypeError')
+
+try:
+ '%l' % 1
+except ValueError:
+ print('ValueError')