pre-commit-hooks/tox.ini
alzeih 0637a50cc2 Fix test error "fatal: empty ident name (for <(null)>) not allowed"
This occurs when there is no global setting for git config options user.name and user.email

An example of the error shown below:

E           pre_commit.util.CalledProcessError: Command: ('/usr/bin/git', 'commit', '-m', 'init', '--allow-empty')
E           Return code: 128
E           Expected return code: 0
E           Output: (none)
E           Errors:
E
E               *** Please tell me who you are.
E
E               Run
E
E                 git config --global user.email "you@example.com"
E                 git config --global user.name "Your Name"
E
E               to set your account's default identity.
E               Omit --global to set the identity only in this repository.
E
E               fatal: empty ident name (for <(null)>) not allowed
2016-12-02 12:50:20 +13:00

29 lines
652 B
INI

[tox]
project = pre_commit_hooks
# These should match the travis env list
envlist = py27,py34,py35,pypy
[testenv]
deps = -rrequirements-dev.txt
passenv = HOME HOMEPATH PROGRAMDATA
setenv =
GIT_AUTHOR_NAME = "test"
GIT_COMMITTER_NAME = "test"
GIT_AUTHOR_EMAIL = "test@example.com"
GIT_COMMITTER_EMAIL = "test@example.com"
commands =
coverage erase
coverage run -m pytest {posargs:tests}
coverage report --show-missing --fail-under 100
pre-commit install -f --install-hooks
pre-commit run --all-files
[testenv:venv]
envdir = venv-{[tox]project}
commands =
[flake8]
max-line-length=131
[pep8]
ignore=E265,E309,E501