コード例 #1
0
ファイル: main.py プロジェクト: gitter-badger/universal-1
def main():
    args, otherthings, parser = parse_known_args()

    if len(otherthings) > 0:
        compile_files(otherthings, args.memory)
    elif args.update:
        return update()
    elif args.problem:
        return problem()
    else:
        parser.print_usage()
        print('No filename passed')
コード例 #2
0
ファイル: main.py プロジェクト: walexzzy/universal
def main():
    args, otherthings, parser = parse_known_args()

    if len(otherthings) > 0:
        compile_files(otherthings, args.memory)
    elif args.update:
        return update()
    elif args.problem:
        return problem()
    else:
        parser.print_usage()
        print('No filename passed')
コード例 #3
0
    def test_update(self, mock_sys_cmd, mock_check_exec_installed):
        update()

        mock_check_exec_installed.assert_called_once_with(['pip'])
        mock_sys_cmd.assert_called_once_with('pip install --upgrade universal')
コード例 #4
0
ファイル: test_util.py プロジェクト: walexzzy/universal
    def test_update(self, mock_sys_cmd, mock_check_exec_installed):
        update()

        mock_check_exec_installed.assert_called_once_with(['pip'])
        mock_sys_cmd.assert_called_once_with('pip install --upgrade universal')