Run flake8 from the generated project root
3.8.1 can't find the config if running from elsewhere:
@@ -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())
