diff --git a/tests/basics/unary_op.py b/tests/basics/unary_op.py index 3084c273e7..bd78a20d0d 100644 --- a/tests/basics/unary_op.py +++ b/tests/basics/unary_op.py @@ -15,3 +15,13 @@ print(not []) print(not [1,]) print(not {}) print(not {1:1}) + +# check user instance +class A: pass +print(not A()) + +# check user instances derived from builtins +class B(int): pass +print(not B()) +class C(list): pass +print(not C())