diff options
| author | Damien George <damien.p.george@gmail.com> | 2015-09-03 23:06:18 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2015-09-03 23:06:18 +0100 |
| commit | 25afc7da0db43754f6b4373a10b66551dd3cbd57 (patch) | |
| tree | e2e116af73a03aaf6e11b4b0065e5f73eb6a91af /tests/misc/non_compliant.py | |
| parent | e2aa1177986d11cbd19ab84ca41b6f0dce51ad01 (diff) | |
tests: Add tests to improve coverage of objstr.c.
Diffstat (limited to 'tests/misc/non_compliant.py')
| -rw-r--r-- | tests/misc/non_compliant.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py index 79f1e70c8..09abac238 100644 --- a/tests/misc/non_compliant.py +++ b/tests/misc/non_compliant.py @@ -40,8 +40,26 @@ try: except NotImplementedError: print('NotImplementedError') +# str(...) with keywords not implemented +try: + str(b'abc', encoding='utf8') +except NotImplementedError: + print('NotImplementedError') + # str.rsplit(None, n) not implemented try: 'a a a'.rsplit(None, 1) except NotImplementedError: print('NotImplementedError') + +# bytes(...) with keywords not implemented +try: + bytes('abc', encoding='utf8') +except NotImplementedError: + print('NotImplementedError') + +# bytes subscr with step!=1 not implemented +try: + b'123'[0:3:2] +except NotImplementedError: + print('NotImplementedError') |
