diff --git a/tests/30_import.py b/tests/30_import.py index ce880027..5a40d1ab 100644 --- a/tests/30_import.py +++ b/tests/30_import.py @@ -42,4 +42,10 @@ from math import ( pow, sin, cos -) \ No newline at end of file +) + +# test reload (dummy) +import importlib +importlib.reload(test2.a) + +assert __import__('math').pi > 3 diff --git a/tests/77_builtin_func_2.py b/tests/77_builtin_func_2.py index b31c4cfd..ef4127e0 100644 --- a/tests/77_builtin_func_2.py +++ b/tests/77_builtin_func_2.py @@ -172,13 +172,22 @@ class A: def __call__(self): pass + @staticmethod + def staticmethod(): + pass + + @classmethod + def classmethod(cls): + pass + assert callable(A) is True # type assert callable(A()) is True # instance with __call__ assert callable(A.__call__) is True # bound method assert callable(A.__init__) is True # bound method assert callable(print) is True # builtin function assert callable(isinstance) is True # builtin function - +assert callable(A.staticmethod) is True # staticmethod +assert callable(A.classmethod) is True # classmethod assert id(0) is None assert id(2**62) is None @@ -241,3 +250,8 @@ assert min([ assert min(1, 2) == 1 assert max(1, 2) == 2 + +def fn(): pass +assert repr(fn).startswith('' \ No newline at end of file