diff options
Diffstat (limited to 'tests/misc/non_compliant.py')
| -rw-r--r-- | tests/misc/non_compliant.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/misc/non_compliant.py b/tests/misc/non_compliant.py index e8ec74b5d..b4c90e9fc 100644 --- a/tests/misc/non_compliant.py +++ b/tests/misc/non_compliant.py @@ -1,7 +1,11 @@ # tests for things that are not implemented, or have non-compliant behaviour -import array -import ustruct +try: + import array + import ustruct +except ImportError: + print("SKIP") + raise SystemExit # when super can't find self try: @@ -124,3 +128,11 @@ try: bytearray(4)[0:1] = [1, 2] except NotImplementedError: print('NotImplementedError') + +# can't assign attributes to a function +def f(): + pass +try: + f.x = 1 +except AttributeError: + print('AttributeError') |
