diff --git a/test/completion/decorators.py b/test/completion/decorators.py index 5893e7b4..ef9bd676 100644 --- a/test/completion/decorators.py +++ b/test/completion/decorators.py @@ -142,6 +142,29 @@ JustAClass.a.__closure__ #? int() JustAClass.a() +# ----------------- +# illegal decorators +# ----------------- + +class DecoratorWithoutCall(): + def __init__(self, func): + self.func = func + def __call__(self): + return self.func() + +@DecoratorWithoutCall +def f(): + return 1 + +@DecoratorWithoutCall(None) +def g(): + return 1 + +#? +f() +#? int() +g() + # ----------------- # method decorators # -----------------