mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
tests: Add more tests to improve coverage, mostly testing exceptions.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user