mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-09-20 10:52:34 +03:00
refactor path reading
Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com>
This commit is contained in:
parent
d57c75d9ec
commit
083c698196
|
@ -168,10 +168,9 @@ def check_paths(paths: Iterable[Path]):
|
||||||
if is_binary(str(path)):
|
if is_binary(str(path)):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
with path.open() as file:
|
content = path.read_text()
|
||||||
for line in file:
|
match = RE_OBJ.search(content)
|
||||||
match = RE_OBJ.search(line)
|
assert match is None, f"cookiecutter variable not replaced in {path}"
|
||||||
assert match is None, f"cookiecutter variable not replaced in {path}"
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id)
|
@pytest.mark.parametrize("context_override", SUPPORTED_COMBINATIONS, ids=_fixture_id)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user