1
import unittest, types, sys
2
sys.path.insert(0, "../src")
27
class StaticMethodsTest(unittest.TestCase):
28
"""Test StaticMethods module"""
30
"""Methods should have type StaticMethod"""
31
assert type(D.foo) is types.FunctionType
32
assert type(D.bar) is types.FunctionType
35
"""Methods should be callable without instance"""
36
assert D.foo(1,2) == (1,2)
37
assert D.bar(3,4) == (3,4)
40
"""Methods should also work bound"""
42
assert d.foo(1,2) == (1,2)
43
assert d.bar(3,4) == (3,4)
45
def testStatic_(self):
46
"""_ Methods should be untouched"""
48
self.assertRaises(TypeError, d._hello, 4)
49
assert d._hello() is d
52
class ClassMethodsTest(unittest.TestCase):
54
"""Test MakeClass function"""
62
if __name__ == "__main__":