def testPyImport(self): f = Mock(fileType = "py") lines = ["import test"] res = pyImport.check(f, lines) assert(res != None and len(res.starts) == 1 and res.starts[0] == "test.py" and res.command == config.pythonCommand + " " + config.targetFilePlaceholder) lines = ["import test1, test2"] res = pyImport.check(f, lines) assert(res != None and len(res.starts) == 2 and res.starts[0] == "test1.py" and res.starts[1] == "test2.py")