import unittest
from viman import vimanApp
class cli_tests(unittest.TestCase):
argv_set = [
['viman', '-h'],
['viman', '-V'],
['viman', '-Q'],
['viman', '-Sf', 'test.yml'],
['viman', '-S', 'https://github.com/vimscript/vim-snippets.git'],
['viman', '-Ur'],
['viman', '-R', 'https://github.com/vimscript/vim-snippets.git'],
['viman', '-Rn', 'a.vim'],
['viman', '-Rf', '~/.viman.yml'],
]
def cli_testing(self):
for argv in cli_tests.argv_set:
self.assertEqual(vimanApp.main(argv), 0)
if __name__ == '__main__':
unittest.main()
1
shylockhg OP 呵呵, 好吧 测试函数要 test_.+形式,真是服了
|