diff --git a/.gitignore b/.gitignore index 92871e8..2351a5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ - d] +# Byte-compiled / optimized / DLL files +__pycache__/ + # C extensions *.so @@ -47,4 +50,5 @@ output/ boilerplate/ # pyenv -.python-version \ No newline at end of file +.python-version + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1419b3b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,16 @@ +cookiecutter +sh +binaryornot + +# Code quality +# ------------------------------------------------------------------------------ +flake8 +pycodestyle +pyflakes + +# Testing +# ------------------------------------------------------------------------------ +tox +pytest +pytest-cookies + diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index abb5239..3b2d338 100644 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -76,11 +76,10 @@ def test_generation(cookies, context): base_path = str(result.project) # Run Flake 8 try: - sh.flake8('{path}/setup.py {path}/{namespace}'.format( - path=base_path, - namespace=context['namespace'] - ) - ) + sh.flake8.bake('{path}/setup.py {path}/{namespace}'.format( + path=base_path, + namespace=context['namespace'] + )) except sh.ErrorReturnCode as e: pytest.fail(e) # Run tests diff --git a/tox.ini b/tox.ini index cc6f4b7..f05cdb9 100644 --- a/tox.ini +++ b/tox.ini @@ -1,3 +1,6 @@ +[flake8] +ignore=W605 + [tox] skip_missing_interpreters=true skipsdist = true