Skip to content

Commit

Permalink
Tests: Use pathlib for files read/write (test_determine_repo_dir_find…
Browse files Browse the repository at this point in the history
…s_existing_cookiecutter.py)
  • Loading branch information
insspb committed Jun 8, 2022
1 parent 14433e1 commit 4aac87e
Showing 1 changed file with 2 additions and 1 deletion.
@@ -1,5 +1,6 @@
"""Tests around detection whether cookiecutter templates are cached locally."""
import os
from pathlib import Path

import pytest

Expand All @@ -20,7 +21,7 @@ def cloned_cookiecutter_path(user_config_data, template):
cloned_template_path = os.path.join(cookiecutters_dir, template)
os.mkdir(cloned_template_path)

open(os.path.join(cloned_template_path, 'cookiecutter.json'), 'w')
Path(cloned_template_path, "cookiecutter.json").open('w') # creates file

return cloned_template_path

Expand Down

0 comments on commit 4aac87e

Please sign in to comment.