Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: accept all alternative extentions for copier.yaml #51

Merged
merged 2 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pytest_copie/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def copy(
"""
# set the template dir and the associated copier.yaml file
template_dir = template_dir or self.default_template_dir
copier_yaml = template_dir / "copier.yaml"
files = template_dir.glob("copier.*")
copier_yaml = next(f for f in files if f.suffix in [".yaml", ".yml"])

# create a new output_dir in the test dir based on the counter value
(output_dir := self.test_dir / f"copie{self.counter:03d}").mkdir()
Expand Down