diff options
author | Damien George <damien.p.george@gmail.com> | 2015-08-21 11:56:14 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2015-08-21 12:02:09 +0100 |
commit | d007cb890394d9d26c6fafb133532a5175d91eb2 (patch) | |
tree | 4fc76a836e7f9738d146bacac9b02f2e288c144b /tests/basics/string1.py | |
parent | d292a81e95bd558f3902f88fa4d6d5641a4aa388 (diff) | |
download | micropython-d007cb890394d9d26c6fafb133532a5175d91eb2.tar.gz micropython-d007cb890394d9d26c6fafb133532a5175d91eb2.zip |
tests: Add more tests to improve coverage, mostly testing exceptions.
Diffstat (limited to 'tests/basics/string1.py')
-rw-r--r-- | tests/basics/string1.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/basics/string1.py b/tests/basics/string1.py index 8d5f4618dc..b8ca15c344 100644 --- a/tests/basics/string1.py +++ b/tests/basics/string1.py @@ -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')) |