mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-09-13 07:22:35 +03:00
Fix ResourceWarning for unclosed files in test_cookiecutter_generation.py (#6020)
Co-authored-by: MauGx3 <225707+MauGx3@users.noreply.github.com> Co-authored-by: Bruno Alla <browniebroke@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ff9ad66afc
commit
1f9f461581
|
@ -168,8 +168,8 @@ def check_paths(paths: Iterable[Path]):
|
|||
if is_binary(str(path)):
|
||||
continue
|
||||
|
||||
for line in path.open():
|
||||
match = RE_OBJ.search(line)
|
||||
content = path.read_text()
|
||||
match = RE_OBJ.search(content)
|
||||
assert match is None, f"cookiecutter variable not replaced in {path}"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user