mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-27 17:00:44 +03:00
Implement test for flake8 compliance
This commit is contained in:
parent
f579cf08ac
commit
664c72d291
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import sh
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from binaryornot.check import is_binary
|
from binaryornot.check import is_binary
|
||||||
|
@ -77,3 +78,13 @@ def test_enabled_features(cookies, feature_context):
|
||||||
paths = build_files_list(str(result.project))
|
paths = build_files_list(str(result.project))
|
||||||
assert paths
|
assert paths
|
||||||
check_paths(paths)
|
check_paths(paths)
|
||||||
|
|
||||||
|
|
||||||
|
def test_flake8_compliance(cookies):
|
||||||
|
"""generated project should pass flake8"""
|
||||||
|
result = cookies.bake()
|
||||||
|
|
||||||
|
try:
|
||||||
|
sh.flake8(str(result.project))
|
||||||
|
except sh.ErrorReturnCode as e:
|
||||||
|
pytest.fail(e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user