Split isort and flake8 tests

This commit is contained in:
Bruno Alla 2023-04-15 14:59:14 +01:00
parent 40e96fa02e
commit 0b35756c72
No known key found for this signature in database
2 changed files with 12 additions and 1 deletions

View File

@ -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

View File

@ -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"],
[ [