mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 09:24:52 +03:00
Fix running tox with AUTOFIXABLE_STYLES
This commit is contained in:
parent
3db8f6acf3
commit
b763318fdc
|
@ -23,7 +23,7 @@ elif sys.platform.startswith("darwin") and os.getenv("CI"):
|
|||
# Run auto-fixable styles checks - skipped on CI by default. These can be fixed
|
||||
# automatically by running pre-commit after generation however they are tedious
|
||||
# to fix in the template, so we don't insist too much in fixing them.
|
||||
AUTOFIXABLE_STYLES = os.getenv("AUTOFIXABLE_STYLES") == 1
|
||||
AUTOFIXABLE_STYLES = os.getenv("AUTOFIXABLE_STYLES") == "1"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
|
@ -144,11 +144,7 @@ def _fixture_id(ctx):
|
|||
|
||||
def build_files_list(base_dir):
|
||||
"""Build a list containing absolute paths to the generated files."""
|
||||
return [
|
||||
os.path.join(dirpath, file_path)
|
||||
for dirpath, subdirs, files in os.walk(base_dir)
|
||||
for file_path in files
|
||||
]
|
||||
return [os.path.join(dirpath, file_path) for dirpath, subdirs, files in os.walk(base_dir) for file_path in files]
|
||||
|
||||
|
||||
def check_paths(paths):
|
||||
|
@ -240,9 +236,7 @@ def test_travis_invokes_pytest(cookies, context, use_docker, expected_test_scrip
|
|||
("y", "docker-compose -f local.yml run django pytest"),
|
||||
],
|
||||
)
|
||||
def test_gitlab_invokes_precommit_and_pytest(
|
||||
cookies, context, use_docker, expected_test_script
|
||||
):
|
||||
def test_gitlab_invokes_precommit_and_pytest(cookies, context, use_docker, expected_test_script):
|
||||
context.update({"ci_tool": "Gitlab", "use_docker": use_docker})
|
||||
result = cookies.bake(extra_context=context)
|
||||
|
||||
|
@ -269,9 +263,7 @@ def test_gitlab_invokes_precommit_and_pytest(
|
|||
("y", "docker-compose -f local.yml run django pytest"),
|
||||
],
|
||||
)
|
||||
def test_github_invokes_linter_and_pytest(
|
||||
cookies, context, use_docker, expected_test_script
|
||||
):
|
||||
def test_github_invokes_linter_and_pytest(cookies, context, use_docker, expected_test_script):
|
||||
context.update({"ci_tool": "Github", "use_docker": use_docker})
|
||||
result = cookies.bake(extra_context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user