diff options
Diffstat (limited to 'tests/basics/hasattr1.py')
-rw-r--r-- | tests/basics/hasattr1.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/basics/hasattr1.py b/tests/basics/hasattr1.py index b1c4b5ceb6..118a19e579 100644 --- a/tests/basics/hasattr1.py +++ b/tests/basics/hasattr1.py @@ -27,3 +27,13 @@ c = C() print(hasattr(c, "exists")) # TODO #print(hasattr(c, "doesnt_exist")) + +try: + hasattr(1, b'123') +except TypeError: + print('TypeError') + +try: + hasattr(1, 123) +except TypeError: + print('TypeError') |