Remove combinations without python code impact from parameters

We cannot test all combinations in a reasonable time, so only include the ones affecting Python files in flake8 tests.
This commit is contained in:
Bruno Alla 2019-03-25 18:49:20 +00:00
parent 346b216c55
commit 61f531b19c

View File

@ -10,7 +10,6 @@ PATTERN = "{{(\s?cookiecutter)[.](.*?)}}"
RE_OBJ = re.compile(PATTERN)
BINARY_CHOICES = ["y", "n"]
JS_TASK_RUNNER_CHOICES = ["None", "Gulp"]
@pytest.fixture
@ -82,10 +81,7 @@ def test_enabled_features(cookies, feature_context):
@pytest.mark.parametrize("windows", BINARY_CHOICES)
@pytest.mark.parametrize("use_pycharm", BINARY_CHOICES)
@pytest.mark.parametrize("use_docker", BINARY_CHOICES)
@pytest.mark.parametrize("js_task_runner", JS_TASK_RUNNER_CHOICES)
@pytest.mark.parametrize("custom_bootstrap_compilation", BINARY_CHOICES)
@pytest.mark.parametrize("use_celery", BINARY_CHOICES)
@pytest.mark.parametrize("use_mailhog", BINARY_CHOICES)
@pytest.mark.parametrize("use_sentry", BINARY_CHOICES)
@ -94,41 +90,26 @@ def test_enabled_features(cookies, feature_context):
["use_compressor", "use_whitenoise"],
[("y", "n"), ("n", "n"), ("n", "n")],
)
@pytest.mark.parametrize("use_heroku", BINARY_CHOICES)
@pytest.mark.parametrize("use_travisci", BINARY_CHOICES)
@pytest.mark.parametrize("keep_local_envs_in_vcs", BINARY_CHOICES)
def test_flake8_compliance(
cookies,
windows,
use_pycharm,
use_docker,
js_task_runner,
custom_bootstrap_compilation,
use_celery,
use_mailhog,
use_sentry,
use_compressor,
use_whitenoise,
use_heroku,
use_travisci,
keep_local_envs_in_vcs,
):
"""generated project should pass flake8"""
result = cookies.bake(
extra_context={
"windows": windows,
"use_pycharm": use_pycharm,
"use_docker": use_docker,
"js_task_runner": js_task_runner,
"custom_bootstrap_compilation": custom_bootstrap_compilation,
"use_compressor": use_compressor,
"use_celery": use_celery,
"use_mailhog": use_mailhog,
"use_sentry": use_sentry,
"use_whitenoise": use_whitenoise,
"use_heroku": use_heroku,
"use_travisci": use_travisci,
"keep_local_envs_in_vcs": keep_local_envs_in_vcs,
}
)