示例#1
0
 def test_fqn(self):
     assert ['bar'] == _PyModule(BAR).fqn
     assert ['foo', '__init__'] == _PyModule(FOO.init).fqn
     assert ['foo', 'foo_a'] == _PyModule(FOO.a).fqn
     assert ['foo', 'sub', 'sub_a'] == _PyModule(SUB.a).fqn
示例#2
0
 def test_repr(self):
     module = _PyModule(SUB.a)
     assert "<_PyModule {}>".format(SUB.a) == repr(module)