[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/og-python-scripts/GitPython/no_devnull_open/git/test/test_exc.py [Back]  [Original]

# -*- coding: utf-8 -*-
# test_exc.py
# Copyright (C) 2008, 2009, 2016 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php


import re

import ddt
from git.exc import (
    CommandError,
    GitCommandNotFound,
    GitCommandError,
    HookExecutionError,
)
from git.test.lib import TestBase

import itertools as itt


_cmd_argvs = (
    ('cmd', ),
    ('', ),
    ('', 'normal', 'argvs'),
    ('cmd', '', 'args'),
    ('', '', '', 'strange', 'args'),
    ('', '', '', 'non-unicode', 'args'),
)
_causes_n_substrings = (
    (None,                      None),                          # noqa: E241 @IgnorePep8
    (7,                         "exit code(7)"),                # noqa: E241 @IgnorePep8
    ('Some string',             "'Some string'"),               # noqa: E241 @IgnorePep8
    (' string',            "' string'"),              # noqa: E241 @IgnorePep8
    (Exception("An exc."),      "Exception('An exc.')"),        # noqa: E241 @IgnorePep8
    (Exception(" exc."),   "Exception(' exc.')"),     # noqa: E241 @IgnorePep8
    (object(),                  "

Web Proxy Viewer  |  New URL  |  Original Page