You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests/master_test.py

22 lines
471 B
Python

import unittest2
import testlib
import mitogen.master
class ScanCodeImportsTest(unittest2.TestCase):
func = staticmethod(mitogen.master.scan_code_imports)
def test_simple(self):
co = compile(open(__file__).read(), __file__, 'exec')
self.assertEquals(list(self.func(co)), [
(-1, 'unittest2', ()),
(-1, 'testlib', ()),
(-1, 'mitogen.master', ()),
])
if __name__ == '__main__':
unittest2.main()