diff options
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 e0b07c3ad6..677438b832 100644 --- a/tests/misc/non_compliant.py +++ b/tests/misc/non_compliant.py @@ -9,6 +9,12 @@ try: except SyntaxError: print('SyntaxError') +# store to exception attribute is not allowed +try: + ValueError().x = 0 +except AttributeError: + print('AttributeError') + # array deletion not implemented try: a = array.array('b', (1, 2, 3)) @@ -23,6 +29,12 @@ try: except NotImplementedError: print('NotImplementedError') +# containment, looking for integer not implemented +try: + print(1 in array.array('B', b'12')) +except NotImplementedError: + print('NotImplementedError') + # should raise type error try: print(set('12') >= '1') @@ -65,6 +77,12 @@ try: except NotImplementedError: print('NotImplementedError') +# str subscr with step!=1 not implemented +try: + print('abc'[1:2:3]) +except NotImplementedError: + print('NotImplementedError') + # bytes(...) with keywords not implemented try: bytes('abc', encoding='utf8') |