mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 16:24:14 +03:00
Run flake8 from the generated project root
3.8.1 can't find the config if running from elsewhere: https://gitlab.com/pycqa/flake8/-/issues/639
This commit is contained in:
parent
cd740c2619
commit
81642420c4
|
@ -156,7 +156,7 @@ def test_flake8_passes(cookies, context_override):
|
|||
result = cookies.bake(extra_context=context_override)
|
||||
|
||||
try:
|
||||
sh.flake8(str(result.project))
|
||||
sh.flake8(_cwd=str(result.project))
|
||||
except sh.ErrorReturnCode as e:
|
||||
pytest.fail(e.stdout.decode())
|
||||
|
||||
|
@ -167,7 +167,7 @@ def test_black_passes(cookies, context_override):
|
|||
result = cookies.bake(extra_context=context_override)
|
||||
|
||||
try:
|
||||
sh.black("--check", "--diff", "--exclude", "migrations", f"{result.project}/")
|
||||
sh.black("--check", "--diff", "--exclude", "migrations", _cwd=str(result.project))
|
||||
except sh.ErrorReturnCode as e:
|
||||
pytest.fail(e.stdout.decode())
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user