Skip to content

Commit

Permalink
Remove nonsensical test
Browse files Browse the repository at this point in the history
  • Loading branch information
lkubb committed Nov 12, 2024
1 parent 5bf9aed commit 98746b5
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions tests/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def test_exclude_templating_with_operation(
Ensure it's possible to create one-off boilerplate files that are not
managed during updates via `_exclude` using the `_operation` context variable.
"""
src, dst, dst2 = map(tmp_path_factory.mktemp, ("src", "dst", "dst2"))
src, dst = map(tmp_path_factory.mktemp, ("src", "dst"))

template = r"{%- if _operation == 'update' %}copy-only{%- endif %}"
with local.cwd(src):
Expand Down Expand Up @@ -51,14 +51,6 @@ def test_exclude_templating_with_operation(
assert copy_only.read_text() == "foo"
assert copy_and_update.read_text() == "bar"

# After using the worker for an `update` operation, reuse it for a `copy` again.
# This checks that the cached `match_exclude` property is regenerated
# after a context switch back from update to copy.
copier.run_copy(str(src), dst2, defaults=True, overwrite=True, vcs_ref="1.0.0")
for filename in ("copy-only", "copy-and-update"):
assert (dst2 / filename).exists()
assert (dst2 / filename).read_text() == "foo"


def test_task_templating_with_operation(
tmp_path_factory: pytest.TempPathFactory, tmp_path: Path
Expand Down

0 comments on commit 98746b5

Please sign in to comment.