tests: Add more tests to improve coverage, mostly testing exceptions.

This commit is contained in:
Damien George
2015-08-21 11:56:14 +01:00
parent d292a81e95
commit d007cb8903
19 changed files with 260 additions and 4 deletions

View File

@@ -20,6 +20,10 @@ print(x)
# binary ops
print('123' + "456")
print('123' * 5)
try:
'123' * '1'
except TypeError:
print('TypeError')
# subscription
print('abc'[1])
@@ -27,11 +31,11 @@ print('abc'[-1])
try:
'abc'[100]
except IndexError:
print('caught')
print('IndexError')
try:
'abc'[-4]
except IndexError:
print('caught2')
print('IndexError')
# iter
print(list('str'))