mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 01:14:53 +03:00
Split isort and flake8 tests
This commit is contained in:
parent
40e96fa02e
commit
0b35756c72
|
@ -7,7 +7,6 @@ binaryornot==0.4.4
|
||||||
black==23.3.0
|
black==23.3.0
|
||||||
isort==5.12.0
|
isort==5.12.0
|
||||||
flake8==6.0.0
|
flake8==6.0.0
|
||||||
flake8-isort==6.0.0
|
|
||||||
pre-commit==3.2.2
|
pre-commit==3.2.2
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
|
|
|
@ -204,6 +204,18 @@ def test_black_passes(cookies, context_override):
|
||||||
pytest.fail(e.stdout.decode())
|
pytest.fail(e.stdout.decode())
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(not AUTOFIXABLE_STYLES, reason="isort is auto-fixable")
|
||||||
|
@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id)
|
||||||
|
def test_isort_passes(cookies, context_override):
|
||||||
|
"""Check whether generated project passes isort style."""
|
||||||
|
result = cookies.bake(extra_context=context_override)
|
||||||
|
|
||||||
|
try:
|
||||||
|
sh.isort(_cwd=str(result.project_path))
|
||||||
|
except sh.ErrorReturnCode as e:
|
||||||
|
pytest.fail(e.stdout.decode())
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
["use_docker", "expected_test_script"],
|
["use_docker", "expected_test_script"],
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in New Issue
Block a user