mirror of
https://github.com/nvbn/thefuck.git
synced 2025-03-20 01:28:56 +00:00
Merge 6cf9139b9668392f6303e5eb608122739c920ab3 into 78769e4fbcccf678c46f46156e6e9bb2b5f84ed1
This commit is contained in:
commit
4db474b172
3
.coveragerc
Normal file
3
.coveragerc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[report]
|
||||||
|
exclude_lines =
|
||||||
|
pragma: no cover ${COVERAGE_PYTHON_VERSION}
|
@ -6,4 +6,9 @@ python:
|
|||||||
install:
|
install:
|
||||||
- python setup.py develop
|
- python setup.py develop
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
script: py.test -v
|
- pip install coveralls
|
||||||
|
script:
|
||||||
|
- export COVERAGE_PYTHON_VERSION=python-${TRAVIS_PYTHON_VERSION:0:1}
|
||||||
|
- coverage run --source=thefuck,tests -m py.test -v
|
||||||
|
after_success:
|
||||||
|
coveralls
|
||||||
|
@ -11,7 +11,7 @@ import six
|
|||||||
from . import logs, conf, types, shells
|
from . import logs, conf, types, shells
|
||||||
|
|
||||||
|
|
||||||
def setup_user_dir():
|
def setup_user_dir(): # pragma: no cover
|
||||||
"""Returns user config dir, create it when it doesn't exist."""
|
"""Returns user config dir, create it when it doesn't exist."""
|
||||||
user_dir = Path(expanduser('~/.thefuck'))
|
user_dir = Path(expanduser('~/.thefuck'))
|
||||||
rules_dir = user_dir.joinpath('rules')
|
rules_dir = user_dir.joinpath('rules')
|
||||||
@ -71,9 +71,9 @@ def wait_output(settings, popen):
|
|||||||
|
|
||||||
def get_command(settings, args):
|
def get_command(settings, args):
|
||||||
"""Creates command from `args` and executes it."""
|
"""Creates command from `args` and executes it."""
|
||||||
if six.PY2:
|
if six.PY2: # pragma: no cover python-3
|
||||||
script = ' '.join(arg.decode('utf-8') for arg in args[1:])
|
script = ' '.join(arg.decode('utf-8') for arg in args[1:])
|
||||||
else:
|
else: # pragma: no cover python-2
|
||||||
script = ' '.join(args[1:])
|
script = ' '.join(args[1:])
|
||||||
|
|
||||||
if not script:
|
if not script:
|
||||||
|
@ -8,10 +8,10 @@ from .types import Command
|
|||||||
|
|
||||||
DEVNULL = open(os.devnull, 'w')
|
DEVNULL = open(os.devnull, 'w')
|
||||||
|
|
||||||
if six.PY2:
|
if six.PY2: # pragma: no cover python-3
|
||||||
import pipes
|
import pipes
|
||||||
quote = pipes.quote
|
quote = pipes.quote
|
||||||
else:
|
else: # pragma: no cover python-2
|
||||||
import shlex
|
import shlex
|
||||||
quote = shlex.quote
|
quote = shlex.quote
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user