repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
copier-org/copier
from __future__ import annotations import filecmp import os import platform import re import stat import sys from contextlib import AbstractContextManager, nullcontext as does_not_raise from decimal import Decimal from enum import Enum from pathlib import Path from textwrap import dedent, indent from time import sleep...
".svn")
assert_*
string_literal
tests/test_copy.py
test_include_file
232
null
copier-org/copier
import os import re from pathlib import Path from tempfile import gettempdir import pytest from plumbum import local from copier import run_copy, run_update from copier.errors import DirtyLocalWarning, ForbiddenPathError from .helpers import build_file_tree, git def test_copy_symlink(tmp_path_factory: pytest.TempPa...
Path("target.txt")
assert
func_call
tests/test_symlinks.py
test_copy_symlink
46
null
copier-org/copier
import json import sys from pathlib import Path from uuid import uuid4 import pytest from plumbum import local import copier from .helpers import build_file_tree, git_save def test_no_path_variables( tmp_path_factory: pytest.TempPathFactory, monkeypatch: pytest.MonkeyPatch ) -> None: """Test that there are ...
""
assert
string_literal
tests/test_context.py
test_no_path_variables
65
null
copier-org/copier
import warnings import pytest import copier from copier.errors import MultipleYieldTagsError, YieldTagInFileError from tests.helpers import build_file_tree def test_raise_yield_tag_in_file(tmp_path_factory: pytest.TempPathFactory) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tr...
YieldTagInFileError, match="file.txt.jinja")
pytest.raises
complex_expr
tests/test_dynamic_file_structures.py
test_raise_yield_tag_in_file
194
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
dedent( """\ love_me: false your_name: "LeChuck" your_age: 220 your_height: 1.9 more_json_info: ["bad", "guy"] anything_else: {"hates": "all"} choose_list: "first" choose_tuple: "second" choose_dict: "third" choose_number: 0.0 minutes_under_water: 10 optional_value: null """ )
assert
func_call
tests/test_complex_questions.py
test_api_str_data
292
null
copier-org/copier
from __future__ import annotations import platform import subprocess import sys from collections.abc import Mapping from pathlib import Path from typing import Any, Protocol, TypeAlias import pexpect import pytest import yaml from coverage.tracer import CTracer from pexpect.popen_spawn import PopenSpawn from plumbum ...
values[:2]
assert
complex_expr
tests/test_prompt.py
test_multiselect_choices_question_multiple_answers
1,044
null
copier-org/copier
from pathlib import Path from textwrap import dedent from typing import Literal import pytest from plumbum import local import copier from copier._user_data import load_answersfile_data from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git, git_init def template_path(tmp_path_factory: pytest.T...
(tmp_path / "conf_readme.md").read_text()
assert
collection
tests/test_subdirectory.py
test_copy_subdirectory_config_no_overwrite
91
null
copier-org/copier
import re from pathlib import Path import pexpect import pytest from plumbum import local from copier._main import run_copy, run_recopy, run_update from copier.errors import InvalidTypeError from .helpers import COPIER_PATH, Spawn, build_file_tree, expect_prompt, git, render @pytest.mark.parametrize("interactive", ...
err
assert
variable
tests/test_output.py
test_messages_quiet
416
null
copier-org/copier
import json import sys from pathlib import Path from uuid import uuid4 import pytest from plumbum import local import copier from .helpers import build_file_tree, git_save def test_exclude_templating_with_operation( tmp_path_factory: pytest.TempPathFactory, ) -> None: """ Ensure it's possible to create ...
"bar"
assert
string_literal
tests/test_context.py
test_exclude_templating_with_operation
109
null
copier-org/copier
from __future__ import annotations from pathlib import Path from typing import Literal import pytest import yaml import copier from copier._cli import CopierApp from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree def template_path(tmp_path_factory: pytest.TempPathFactory) -> str: root = tmp_...
not skip_tasks
assert
complex_expr
tests/test_tasks.py
test_copy_cli_skip_tasks
108
null
copier-org/copier
from unittest.mock import Mock, patch import pytest from copier._main import Worker from copier.errors import CopierAnswersInterrupt from .helpers import build_file_tree def test_multiple_questions_interrupt(tmp_path_factory: pytest.TempPathFactory) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst"...
{ "question1": "foobar", "question2": "yosemite", }
assert
collection
tests/test_interrupts.py
test_multiple_questions_interrupt
70
null
copier-org/copier
import json import platform from pathlib import Path from shutil import copytree import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UserMessageError from .helpers import BRACKET_ENVOPS_JSON, PROJECT_TEMPLATE, b...
{"_commit": "v2.0", "_src_path": str(src)}
assert
collection
tests/test_legacy_migration.py
test_migrations_and_tasks
92
null
copier-org/copier
from __future__ import annotations import platform import stat from pathlib import Path from shutil import rmtree from textwrap import dedent from typing import Literal import pexpect import pytest from plumbum import local from copier._cli import CopierApp from copier._main import Worker, run_copy, run_update from ...
"v2"
assert
string_literal
tests/test_updatediff.py
test_update_in_repo_subdirectory
1,115
null
copier-org/copier
from pathlib import Path from shutil import copy2, copytree import pytest from plumbum import local from pytest_gitconfig.plugin import GitConfig import copier from copier._main import run_copy, run_update from copier.errors import DirtyLocalWarning, UserMessageError from .helpers import DATA, PROJECT_TEMPLATE, buil...
(dst / "aaaa.txt").read_text()
assert
collection
tests/test_dirty_local.py
test_update
144
null
copier-org/copier
from __future__ import annotations import platform import subprocess import sys from collections.abc import Mapping from pathlib import Path from typing import Any, Protocol, TypeAlias import pexpect import pytest import yaml from coverage.tracer import CTracer from pexpect.popen_spawn import PopenSpawn from plumbum ...
"v2"
assert
string_literal
tests/test_prompt.py
test_copy_default_advertised
170
null
copier-org/copier
import os import re from pathlib import Path from tempfile import gettempdir import pytest from plumbum import local from copier import run_copy, run_update from copier.errors import DirtyLocalWarning, ForbiddenPathError from .helpers import build_file_tree, git def test_update_symlink(tmp_path_factory: pytest.Temp...
Path("bbbb.txt")
assert
func_call
tests/test_symlinks.py
test_update_symlink
282
null
copier-org/copier
from pathlib import Path import pytest from copier._cli import CopierApp from copier._main import run_copy, run_recopy, run_update from .helpers import build_file_tree, git def template_path(tmp_path_factory: pytest.TempPathFactory) -> str: # V1 of the template root = tmp_path_factory.mktemp("template") ...
"true"
assert
string_literal
tests/test_tmpdir.py
test_api
67
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
"a1"
assert
string_literal
tests/test_complex_questions.py
test_multi_template_answers
575
null
copier-org/copier
from __future__ import annotations import platform import stat from pathlib import Path from shutil import rmtree from textwrap import dedent from typing import Literal import pexpect import pytest from plumbum import local from copier._cli import CopierApp from copier._main import Worker, run_copy, run_update from ...
True
assert
bool_literal
tests/test_updatediff.py
test_overwrite_answers_file_always
882
null
copier-org/copier
import pytest import copier from .helpers import build_file_tree def test_binary_file_fallback_to_copy(tmp_path_factory: pytest.TempPathFactory) -> None: root, dest = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (root / "copier.yaml"): ( """\ ...
logo_bytes
assert
variable
tests/test_empty_suffix.py
test_binary_file_fallback_to_copy
60
null
copier-org/copier
import json import sys from pathlib import Path from uuid import uuid4 import pytest from plumbum import local import copier from .helpers import build_file_tree, git_save def test_task_templating_with_operation( tmp_path_factory: pytest.TempPathFactory, tmp_path: Path ) -> None: """ Ensure that it is p...
2
assert
numeric_literal
tests/test_context.py
test_task_templating_with_operation
188
null
copier-org/copier
import platform from collections.abc import Mapping from pathlib import Path import pytest from copier._main import run_copy from copier._template import DEFAULT_EXCLUDE from copier._types import StrOrPath from .helpers import PROJECT_TEMPLATE, build_file_tree def test_config_exclude_with_subdirectory( tmp_path...
DEFAULT_EXCLUDE
assert
variable
tests/test_exclude.py
test_config_exclude_with_subdirectory
105
null
copier-org/copier
from __future__ import annotations from pathlib import Path from typing import Literal import pytest import yaml import copier from copier._cli import CopierApp from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree def template_path(tmp_path_factory: pytest.TempPathFactory) -> str: root = tmp_...
0
assert
numeric_literal
tests/test_tasks.py
test_copy_cli_skip_tasks
107
null
copier-org/copier
from __future__ import annotations import os import platform from pathlib import Path import pytest import yaml from copier._settings import SettingsModel from copier.errors import MissingSettingsWarning def test_settings_from_param( settings_path: Path, tmp_path: Path, monkeypatch: pytest.MonkeyPatch ) -> None...
{"from": "file"}
assert
collection
tests/test_settings_deprecated.py
test_settings_from_param
78
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Sequence from datetime import datetime import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier._main import Worker from copier._types import AnyByStrDict from copier._user_data...
2
assert
numeric_literal
tests/test_templated_prompt.py
test_templated_prompt_builtins
248
null
copier-org/copier
from __future__ import annotations import os import platform from pathlib import Path import pytest import yaml from copier._settings import SettingsModel from copier.errors import MissingSettingsWarning def test_default_settings() -> None: settings = SettingsModel() assert settings.defaults == {} ass...
set()
assert
func_call
tests/test_settings_deprecated.py
test_default_settings
18
null
copier-org/copier
import re from pathlib import Path import pexpect import pytest from plumbum import local from copier._main import run_copy, run_recopy, run_update from copier.errors import InvalidTypeError from .helpers import COPIER_PATH, Spawn, build_file_tree, expect_prompt, git, render @pytest.mark.parametrize("interactive", ...
"v2"
assert
string_literal
tests/test_output.py
test_messages_with_inline_text
201
null
copier-org/copier
import warnings import pytest import copier from copier.errors import MultipleYieldTagsError, YieldTagInFileError from tests.helpers import build_file_tree def test_folder_loop(tmp_path_factory: pytest.TempPathFactory) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( ...
f"Hello {f.parent.name}"
assert
string_literal
tests/test_dynamic_file_structures.py
test_folder_loop
37
null
copier-org/copier
from pathlib import Path from shutil import copy2, copytree import pytest from plumbum import local from pytest_gitconfig.plugin import GitConfig import copier from copier._main import run_copy, run_update from copier.errors import DirtyLocalWarning, UserMessageError from .helpers import DATA, PROJECT_TEMPLATE, buil...
UserMessageError, match="Destination repository is dirty")
pytest.raises
complex_expr
tests/test_dirty_local.py
test_parallel_projects_in_subdirs
277
null
copier-org/copier
from pathlib import Path from shutil import copy2, copytree import pytest from plumbum import local from pytest_gitconfig.plugin import GitConfig import copier from copier._main import run_copy, run_update from copier.errors import DirtyLocalWarning, UserMessageError from .helpers import DATA, PROJECT_TEMPLATE, buil...
expected
assert
variable
tests/test_dirty_local.py
test_parallel_projects_in_subdirs
273
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
ValidationError)
pytest.raises
variable
tests/test_config.py
test_flags_bad_data
331
null
copier-org/copier
import warnings import pytest import copier from .helpers import build_file_tree def test_to_not_keep_trailing_newlines_in_jinja2( tmp_path_factory: pytest.TempPathFactory, ) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (src / "copier.yml"): ( ...
"This is foo."
assert
string_literal
tests/test_normal_jinja2.py
test_to_not_keep_trailing_newlines_in_jinja2
73
null
copier-org/copier
from pathlib import Path import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UnsafeTemplateError, UserMessageError from .helpers import ( COPIER_ANSWERS_FILE, PROJECT_TEMPLATE, build_file_tree, g...
UnsafeTemplateError)
pytest.raises
variable
tests/test_migrations.py
test_requires_unsafe
78
null
copier-org/copier
from pathlib import Path from textwrap import dedent from typing import Literal import pytest from plumbum import local import copier from copier._user_data import load_answersfile_data from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git, git_init def template_path(tmp_path_factory: pytest.T...
(tmp_path / "mock_filename").read_text()
assert
collection
tests/test_subdirectory.py
test_copy_subdirectory_config_no_overwrite
90
null
copier-org/copier
import os import re from pathlib import Path from tempfile import gettempdir import pytest from plumbum import local from copier import run_copy, run_update from copier.errors import DirtyLocalWarning, ForbiddenPathError from .helpers import build_file_tree, git def test_update_symlink(tmp_path_factory: pytest.Temp...
p2.read_text()
assert
func_call
tests/test_symlinks.py
test_update_symlink
272
null
copier-org/copier
from __future__ import annotations import os import platform from collections.abc import Sequence from pathlib import Path import pytest import yaml from copier import Settings, load_settings, run_copy from copier._settings import _default_settings_path, is_trusted_repository from copier.errors import MissingSetting...
SettingsError, match=error)
pytest.raises
complex_expr
tests/test_settings.py
test_load_settings_with_invalid_data
143
null
copier-org/copier
from __future__ import annotations import filecmp import os import platform import re import stat import sys from contextlib import AbstractContextManager, nullcontext as does_not_raise from decimal import Decimal from enum import Enum from pathlib import Path from textwrap import dedent, indent from time import sleep...
expected
assert
variable
tests/test_copy.py
test_multiselect_choices_with_templated_default_value
1,278
null
copier-org/copier
import warnings import pytest import copier from copier.errors import MultipleYieldTagsError, YieldTagInFileError from tests.helpers import build_file_tree def test_file_loop(tmp_path_factory: pytest.TempPathFactory) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { ...
f"Hello {f.stem}.txt"
assert
string_literal
tests/test_dynamic_file_structures.py
test_file_loop
116
null
copier-org/copier
from pathlib import Path from textwrap import dedent import pytest from plumbum import local from copier import run_copy, run_recopy from copier._cli import CopierApp from copier._user_data import load_answersfile_data from copier._vcs import get_git from .helpers import build_file_tree, git_save def tpl(tmp_path_f...
"This is my name: Mario."
assert
string_literal
tests/test_recopy.py
test_recopy_works_without_replay
76
null
copier-org/copier
import os import shutil from collections.abc import Callable, Iterator, Sequence from pathlib import Path import pytest from packaging.version import Version from plumbum import local from pytest_gitconfig.plugin import GitConfig from copier import run_copy, run_update from copier._main import Worker from copier._use...
"v1.0.1"
assert
string_literal
tests/test_vcs.py
test_select_latest_version_tag
238
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
{}
assert
collection
tests/test_config.py
test_config_data_empty
309
null
copier-org/copier
from __future__ import annotations import os import platform from pathlib import Path import pytest import yaml from copier._settings import SettingsModel from copier.errors import MissingSettingsWarning @pytest.mark.parametrize( "encoding", ["utf-8", "utf-8-sig", "utf-16-le", "utf-16-be"], ) def test_setti...
defaults
assert
variable
tests/test_settings_deprecated.py
test_settings_from_utf_file
116
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
InvalidConfigFileError)
pytest.raises
variable
tests/test_config.py
test_invalid_yaml
157
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
"a2"
assert
string_literal
tests/test_complex_questions.py
test_multi_template_answers
579
null
copier-org/copier
from pathlib import Path import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UnsafeTemplateError, UserMessageError from .helpers import ( COPIER_ANSWERS_FILE, PROJECT_TEMPLATE, build_file_tree, g...
"v2.a2"
assert
string_literal
tests/test_migrations.py
test_prerelease_version_migration
174
null
copier-org/copier
import pytest import yaml import copier from copier._types import AnyByStrDict from .helpers import build_file_tree @pytest.mark.parametrize( "subdir, settings", [ ( "", { "_exclude": ["includes"], }, ), ( "template", ...
"the-name"
assert
string_literal
tests/test_imports.py
test_include
71
null
copier-org/copier
from __future__ import annotations import platform import subprocess import sys from collections.abc import Mapping from pathlib import Path from typing import Any, Protocol, TypeAlias import pexpect import pytest import yaml from coverage.tracer import CTracer from pexpect.popen_spawn import PopenSpawn from plumbum ...
2.0
assert
numeric_literal
tests/test_prompt.py
test_update_choice
679
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
("*.yml",)
assert
collection
tests/test_config.py
test_valid_multi_section
230
null
copier-org/copier
import os import shutil from collections.abc import Callable, Iterator, Sequence from pathlib import Path import pytest from packaging.version import Version from plumbum import local from pytest_gitconfig.plugin import GitConfig from copier import run_copy, run_update from copier._main import Worker from copier._use...
user_src_path
assert
variable
tests/test_vcs.py
test_update_using_local_source_path_with_tilde
181
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Sequence from datetime import datetime import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier._main import Worker from copier._types import AnyByStrDict from copier._user_data...
"It's only 1..."
assert
string_literal
tests/test_templated_prompt.py
test_templated_prompt_custom_envops
225
null
copier-org/copier
from pathlib import Path from textwrap import dedent import pytest from plumbum import local from copier import run_copy, run_recopy from copier._cli import CopierApp from copier._user_data import load_answersfile_data from copier._vcs import get_git from .helpers import build_file_tree, git_save def tpl(tmp_path_f...
0
assert
numeric_literal
tests/test_recopy.py
test_recopy_discards_evolution_cli
57
null
copier-org/copier
from pathlib import Path from shutil import copy2, copytree import pytest from plumbum import local from pytest_gitconfig.plugin import GitConfig import copier from copier._main import run_copy, run_update from copier.errors import DirtyLocalWarning, UserMessageError from .helpers import DATA, PROJECT_TEMPLATE, buil...
f"Updated {dst.name}"
assert
string_literal
tests/test_dirty_local.py
test_parallel_projects_in_subdirs
268
null
copier-org/copier
import json import platform from pathlib import Path from shutil import copytree import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UserMessageError from .helpers import BRACKET_ENVOPS_JSON, PROJECT_TEMPLATE, b...
"task 1\ntask 2\n" * 2
assert
string_literal
tests/test_legacy_migration.py
test_migrations_and_tasks
82
null
copier-org/copier
from __future__ import annotations import filecmp import os import platform import re import stat import sys from contextlib import AbstractContextManager, nullcontext as does_not_raise from decimal import Decimal from enum import Enum from pathlib import Path from textwrap import dedent, indent from time import sleep...
content
assert
variable
tests/test_copy.py
test_skip_option
337
null
copier-org/copier
import warnings import pytest import copier from copier.errors import MultipleYieldTagsError, YieldTagInFileError from tests.helpers import build_file_tree def test_raise_multiple_yield_tags(tmp_path_factory: pytest.TempPathFactory) -> None: src, dst = map(tmp_path_factory.mktemp, ("src", "dst")) # multiple ...
MultipleYieldTagsError, match="item")
pytest.raises
complex_expr
tests/test_dynamic_file_structures.py
test_raise_multiple_yield_tags
218
null
copier-org/copier
from __future__ import annotations import os import platform from collections.abc import Sequence from pathlib import Path import pytest import yaml from copier import Settings, load_settings, run_copy from copier._settings import _default_settings_path, is_trusted_repository from copier.errors import MissingSetting...
[]
assert
collection
tests/test_settings.py
test_default_settings
21
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Sequence from datetime import datetime import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier._main import Worker from copier._types import AnyByStrDict from copier._user_data...
{ "_src_path": str(src), "_commit": "v1", "cloud": "AWS", "iac": "cf", }
assert
collection
tests/test_templated_prompt.py
test_templated_prompt_update_previous_answer_disabled
474
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
dedent( """\ love_me: false your_name: "LeChuck" your_age: 220 your_height: 1.9 more_json_info: ["bad", "guy"] anything_else: {"hates": "all"} choose_list: "first" choose_tuple: "second" choose_dict: "third" choose_number: -1.1 minutes_under_water: 10 optional_value: null """ )
assert
func_call
tests/test_complex_questions.py
test_api
153
null
copier-org/copier
from __future__ import annotations import json from pathlib import Path from textwrap import dedent import pytest import yaml import copier from copier._user_data import load_answersfile_data from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git_save def template_path(tmp_path_factory: pytest...
expected_parent1_answers
assert
variable
tests/test_answersfile.py
test_external_data
187
null
copier-org/copier
import json import platform from pathlib import Path from shutil import copytree import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UserMessageError from .helpers import BRACKET_ENVOPS_JSON, PROJECT_TEMPLATE, b...
answers
assert
variable
tests/test_legacy_migration.py
test_pre_migration_modifies_answers
168
null
copier-org/copier
import os import shutil from collections.abc import Callable, Iterator, Sequence from pathlib import Path import pytest from packaging.version import Version from plumbum import local from pytest_gitconfig.plugin import GitConfig from copier import run_copy, run_update from copier._main import Worker from copier._use...
None
assert
none_literal
tests/test_vcs.py
test_get_repo
62
null
copier-org/copier
from pathlib import Path from textwrap import dedent import pytest from plumbum import local from copier import run_copy, run_recopy from copier._cli import CopierApp from copier._user_data import load_answersfile_data from copier._vcs import get_git from .helpers import build_file_tree, git_save def tpl(tmp_path_f...
False
assert
bool_literal
tests/test_recopy.py
test_recopy_with_skip_answered_and_new_answer
96
null
copier-org/copier
from __future__ import annotations from pathlib import Path import pytest import copier from copier._user_data import load_answersfile_data from .helpers import build_file_tree def template_path(tmp_path_factory: pytest.TempPathFactory) -> str: root = tmp_path_factory.mktemp("template") build_file_tree( ...
"mymodule"
assert
string_literal
tests/test_answersfile_templating.py
test_answersfile_templating
60
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
result
assert
variable
tests/test_complex_questions.py
test_tui_inherited_default
427
null
copier-org/copier
from unittest.mock import Mock, patch import pytest from copier._main import Worker from copier.errors import CopierAnswersInterrupt from .helpers import build_file_tree @pytest.mark.parametrize( "side_effect", [ # We override the prompt method from questionary to raise this # exception and ...
KeyboardInterrupt)
pytest.raises
variable
tests/test_interrupts.py
test_keyboard_interrupt
38
null
copier-org/copier
from pathlib import Path import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UnsafeTemplateError, UserMessageError from .helpers import ( COPIER_ANSWERS_FILE, PROJECT_TEMPLATE, build_file_tree, g...
"Hello World"
assert
string_literal
tests/test_migrations.py
test_migration_run_before
352
null
copier-org/copier
from __future__ import annotations import filecmp import os import platform import re import stat import sys from contextlib import AbstractContextManager, nullcontext as does_not_raise from decimal import Decimal from enum import Enum from pathlib import Path from textwrap import dedent, indent from time import sleep...
generate
assert
variable
tests/test_copy.py
test_empty_dir
386
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
{"disabled": "hello", "disabled_with_default": "hello"}
assert
collection
tests/test_complex_questions.py
test_omit_answer_for_skipped_question
616
null
copier-org/copier
import os import re from pathlib import Path from tempfile import gettempdir import pytest from plumbum import local from copier import run_copy, run_update from copier.errors import DirtyLocalWarning, ForbiddenPathError from .helpers import build_file_tree, git def test_recursive_symlink(tmp_path_factory: pytest.T...
Path("../../../")
assert
func_call
tests/test_symlinks.py
test_recursive_symlink
450
null
copier-org/copier
from __future__ import annotations import os import platform from collections.abc import Sequence from pathlib import Path import pytest import yaml from copier import Settings, load_settings, run_copy from copier._settings import _default_settings_path, is_trusted_repository from copier.errors import MissingSetting...
{}
assert
collection
tests/test_settings.py
test_default_settings
20
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Sequence from datetime import datetime import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier._main import Worker from copier._types import AnyByStrDict from copier._user_data...
raises)
pytest.raises
variable
tests/test_templated_prompt.py
test_templated_prompt_invalid
278
null
copier-org/copier
import re from pathlib import Path import pexpect import pytest from plumbum import local from copier._main import run_copy, run_recopy, run_update from copier.errors import InvalidTypeError from .helpers import COPIER_PATH, Spawn, build_file_tree, expect_prompt, git, render def test_output_quiet(capsys: pytest.Cap...
""
assert
string_literal
tests/test_output.py
test_output_quiet
55
null
copier-org/copier
import json import platform from pathlib import Path from shutil import copytree import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UserMessageError from .helpers import BRACKET_ENVOPS_JSON, PROJECT_TEMPLATE, b...
UserMessageError)
pytest.raises
variable
tests/test_legacy_migration.py
test_prereleases
259
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Sequence from datetime import datetime import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier._main import Worker from copier._types import AnyByStrDict from copier._user_data...
datetime.utcnow()
assert
func_call
tests/test_templated_prompt.py
test_templated_prompt_builtins
250
null
copier-org/copier
from __future__ import annotations import os import platform from pathlib import Path import pytest import yaml from copier._settings import SettingsModel from copier.errors import MissingSettingsWarning def test_default_settings() -> None: settings = SettingsModel() assert settings.defaults ==
{}
assert
collection
tests/test_settings_deprecated.py
test_default_settings
17
null
copier-org/copier
from pathlib import Path from shutil import copy2, copytree import pytest from plumbum import local from pytest_gitconfig.plugin import GitConfig import copier from copier._main import run_copy, run_update from copier.errors import DirtyLocalWarning, UserMessageError from .helpers import DATA, PROJECT_TEMPLATE, buil...
dst.name
assert
complex_expr
tests/test_dirty_local.py
test_parallel_projects_in_subdirs
266
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
answers1
assert
variable
tests/test_complex_questions.py
test_multi_template_answers
576
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
{ "test1": "False", "test2": "False", }
assert
collection
tests/test_complex_questions.py
test_tui_typed_default
471
null
copier-org/copier
from __future__ import annotations import json from pathlib import Path from textwrap import dedent import pytest import yaml import copier from copier._user_data import load_answersfile_data from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git_save def template_path(tmp_path_factory: pytest...
log
assert
variable
tests/test_answersfile.py
test_answersfile
85
null
copier-org/copier
import pytest import copier from .helpers import build_file_tree def test_empty_suffix(tmp_path_factory: pytest.TempPathFactory) -> None: root, dest = map(tmp_path_factory.mktemp, ("src", "dst")) build_file_tree( { (root / "copier.yaml"): ( """\ _templates_...
expected
assert
variable
tests/test_empty_suffix.py
test_empty_suffix
34
null
copier-org/copier
from __future__ import annotations import subprocess import sys from collections.abc import Callable, Generator from pathlib import Path import pytest import yaml from plumbum import local from copier._cli import CopierApp from copier._user_data import load_answersfile_data from .helpers import COPIER_CMD, build_fi...
0
assert
numeric_literal
tests/test_cli.py
test_good_cli_run
69
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
conf.all_exclusions
assert
complex_expr
tests/test_config.py
test_worker_config_precedence
384
null
copier-org/copier
from __future__ import annotations from contextlib import AbstractContextManager, nullcontext as does_not_raise from pathlib import Path import pytest import yaml from jinja2.ext import Extension from plumbum import local from copier._cli import CopierApp from copier._main import run_copy, run_update from copier._ty...
"v1"
assert
string_literal
tests/test_unsafe.py
test_update
333
null
copier-org/copier
from __future__ import annotations import json from pathlib import Path from textwrap import dedent import pytest import yaml import copier from copier._user_data import load_answersfile_data from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git_save def template_path(tmp_path_factory: pytest...
{ "parent1": "P1", "parent2": "P2", "child": "C1", }
assert
collection
tests/test_answersfile.py
test_external_data
221
null
copier-org/copier
from pathlib import Path import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UnsafeTemplateError, UserMessageError from .helpers import ( COPIER_ANSWERS_FILE, PROJECT_TEMPLATE, build_file_tree, g...
UserMessageError)
pytest.raises
variable
tests/test_migrations.py
test_prerelease_version_migration
180
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
expected_initial
assert
variable
tests/test_config.py
test_user_defaults_updated
693
null
copier-org/copier
from __future__ import annotations import filecmp import os import platform import re import stat import sys from contextlib import AbstractContextManager, nullcontext as does_not_raise from decimal import Decimal from enum import Enum from pathlib import Path from textwrap import dedent, indent from time import sleep...
"two"
assert
string_literal
tests/test_copy.py
test_templated_choices
1,120
null
copier-org/copier
import platform from collections.abc import Mapping from pathlib import Path import pytest from copier._main import run_copy from copier._template import DEFAULT_EXCLUDE from copier._types import StrOrPath from .helpers import PROJECT_TEMPLATE, build_file_tree @pytest.mark.xfail( condition=platform.system() == ...
value
assert
variable
tests/test_exclude.py
test_path_filter
97
null
copier-org/copier
from __future__ import annotations import json from collections import deque from pathlib import Path from textwrap import dedent import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier import run_copy, run_update from copier._user_data import load_an...
{"_src_path": str(src)}
assert
collection
tests/test_complex_questions.py
test_tui_typed_default
470
null
copier-org/copier
from __future__ import annotations import subprocess import sys from collections.abc import Callable, Generator from pathlib import Path import pytest import yaml from plumbum import local from copier._cli import CopierApp from copier._user_data import load_answersfile_data from .helpers import COPIER_CMD, build_fi...
src
assert
variable
tests/test_cli.py
test_good_cli_run_dot_config
336
null
copier-org/copier
from __future__ import annotations from contextlib import AbstractContextManager, nullcontext as does_not_raise from pathlib import Path import pytest import yaml from jinja2.ext import Extension from plumbum import local from copier._cli import CopierApp from copier._main import run_copy, run_update from copier._ty...
4
assert
numeric_literal
tests/test_unsafe.py
test_update_cli
416
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Sequence from datetime import datetime import pexpect import pytest import yaml from pexpect.popen_spawn import PopenSpawn from plumbum import local from copier._main import Worker from copier._types import AnyByStrDict from copier._user_data...
"It's over 9000!"
assert
string_literal
tests/test_templated_prompt.py
test_templated_prompt_custom_envops
219
null
copier-org/copier
import platform from collections.abc import Mapping from pathlib import Path import pytest from copier._main import run_copy from copier._template import DEFAULT_EXCLUDE from copier._types import StrOrPath from .helpers import PROJECT_TEMPLATE, build_file_tree def test_exclude_wildcard_negate_nested_file( tmp_p...
Path( "..", "keep-me.txt" )
assert
func_call
tests/test_exclude.py
test_exclude_wildcard_negate_nested_file
261
null
copier-org/copier
from __future__ import annotations import json from collections.abc import Callable from pathlib import Path from textwrap import dedent from typing import Any import pytest from plumbum import local from pydantic import ValidationError import copier from copier._main import Worker from copier._template import DEFAU...
expected
assert
variable
tests/test_config.py
test_user_defaults
505
null
copier-org/copier
import json from pathlib import Path from typing import Any import pytest from jinja2 import Environment from jinja2.ext import Extension import copier from .helpers import PROJECT_TEMPLATE, build_file_tree def test_default_jinja2_extensions(tmp_path: Path) -> None: copier.run_copy(str(PROJECT_TEMPLATE) + "_ext...
"path\n"
assert
string_literal
tests/test_jinja2_extensions.py
test_default_jinja2_extensions
43
null
copier-org/copier
from __future__ import annotations import platform import subprocess import sys from collections.abc import Mapping from pathlib import Path from typing import Any, Protocol, TypeAlias import pexpect import pytest import yaml from coverage.tracer import CTracer from pexpect.popen_spawn import PopenSpawn from plumbum ...
"v1"
assert
string_literal
tests/test_prompt.py
test_copy_default_advertised
151
null
copier-org/copier
from pathlib import Path from textwrap import dedent from typing import Literal import pytest from plumbum import local import copier from copier._user_data import load_answersfile_data from .helpers import BRACKET_ENVOPS_JSON, SUFFIX_TMPL, build_file_tree, git, git_init def template_path(tmp_path_factory: pytest.T...
readme.splitlines()
assert
func_call
tests/test_subdirectory.py
test_new_version_uses_subdirectory
269
null
copier-org/copier
from pathlib import Path import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UnsafeTemplateError, UserMessageError from .helpers import ( COPIER_ANSWERS_FILE, PROJECT_TEMPLATE, build_file_tree, g...
"Hello Copier"
assert
string_literal
tests/test_migrations.py
test_migration_run_before
361
null
copier-org/copier
from pathlib import Path import pytest from plumbum import local from copier import run_copy, run_update from copier._user_data import load_answersfile_data from copier.errors import UnsafeTemplateError, UserMessageError from .helpers import ( COPIER_ANSWERS_FILE, PROJECT_TEMPLATE, build_file_tree, g...
env
assert
variable
tests/test_migrations.py
test_migration_env_variables
455
null
copier-org/copier
import os import shutil from collections.abc import Callable, Iterator, Sequence from pathlib import Path import pytest from packaging.version import Version from plumbum import local from pytest_gitconfig.plugin import GitConfig from copier import run_copy, run_update from copier._main import Worker from copier._use...
"git@git.myproject.org:MyProject"
assert
string_literal
tests/test_vcs.py
test_get_repo
23
null