diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basics/builtin_type.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/basics/builtin_type.py b/tests/basics/builtin_type.py index 83c45c64b..c5fb36626 100644 --- a/tests/basics/builtin_type.py +++ b/tests/basics/builtin_type.py @@ -11,3 +11,21 @@ try: type(1, 2) except TypeError: print('TypeError') + +# second arg should be a tuple +try: + type('abc', None, None) +except TypeError: + print('TypeError') + +# third arg should be a dict +try: + type('abc', (), None) +except TypeError: + print('TypeError') + +# elements of second arg (the bases) should be types +try: + type('abc', (1,), {}) +except TypeError: + print('TypeError') |
