repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_builder_convert_entry_points
assert
variable
43
from __future__ import annotations import sys from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.factory import Factory from poetry.core.masonry.builders.builder import Builder @pytest.mark.parametrize( "fixture, result", [ ( ...
result
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_sdist.py
test_make_pkg_info_any_python
assert
variable
52
from __future__ import annotations import ast import gzip import hashlib import shutil import tarfile from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Iterator import pytest from packaging.utils import canonicalize_name from poetry....
parsed
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_to_pep_508_with_patch_python_version
assert
variable
38
from __future__ import annotations from contextlib import AbstractContextManager from contextlib import nullcontext from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency impo...
marker
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_specification.py
test_is_direct_origin
assert
variable
20
from __future__ import annotations import pytest from poetry.core.packages.specification import PackageSpecification @pytest.mark.parametrize( ("source_type", "result"), [ ("directory", True), ("file", True), ("url", True), ("git", True), ("legacy", False), (No...
result
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils.py
test_is_python_project
assert
variable
30
from __future__ import annotations from pathlib import Path import pytest from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_version_constraint from poetry.core.constraints.version import parse_marker_version_...
result
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_poetry_config
assert
variable
21
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectException from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils._compat import tomllib def test_pyproject_toml_poetry_config( pyproject_toml: Path, poetry_section...
config
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_segments.py
test_release_from_parts_to_parts
assert
variable
21
from __future__ import annotations import pytest from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag from poetry.core.version.pep440.segments import RELEASE_PHASE_NORMALIZATIONS @pytest.mark.parametrize( "parts,result", [ ((1,), Release(1)), ((1, 2...
result
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_version.py
test_pep440_parse_text
assert
variable
106
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.version.exceptions import InvalidVersion from poetry.core.version.pep440 import PEP440Version from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag @pytest.mark.parametrize( ...
result
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_markers.py
test_parse_marker
assert
variable
70
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import UnionConstraint from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_versi...
marker
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_markers.py
test_union_of_multi_with_a_containing_single
assert
variable
33
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import UnionConstraint from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_versi...
single
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_parse_valid
assert
variable
38
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
version
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_metadata.py
test_from_package_readme_issues
assert
variable
31
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage @pytest.mark.parametrize( ("exception", "message"), [ (FileNotFoundError, "Read...
message
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/utils/test_package_include.py
test_package_include_with_non_existent_directory
assert
variable
19
from __future__ import annotations from pathlib import Path import pytest from poetry.core.masonry.utils.package_include import PackageInclude fixtures_dir = Path(__file__).parent / "fixtures" with_includes = fixtures_dir / "with_includes" def test_package_include_with_non_existent_directory() -> None: with py...
err_str
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/generic/test_constraint.py
test_allows
assert
variable
30
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import AnyConstraint from poetry.core.constraints.generic import Constraint from poetry.core.constraints.generic import EmptyConstraint from poetry.core.constraints.generic import MultiConstraint fr...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/generic/test_constraint.py
test_invert
assert
variable
27
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import AnyConstraint from poetry.core.constraints.generic import Constraint from poetry.core.constraints.generic import EmptyConstraint from poetry.core.constraints.generic import MultiConstraint fr...
inverted
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_parse_constraint.py
test_constraints_keep_version_precision
assert
variable
42
from __future__ import annotations import pytest from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionConstraint from poetry.core.constraints.version import VersionRange from poetry.core.constraints.version import VersionUnion from poetry.core.constraints.version impo...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_utils.py
test_constraint_regions
assert
variable
78
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.constraints.version import constraint_regions PY...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_stable
assert
variable
50
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version_range.py
test_is_single_wildcard_range_include_min_include_max
assert
variable
68
from __future__ import annotations import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.constraints.version import parse_constraint def v003() -> Version: return Vers...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version_union.py
test_excludes_single_wildcard_range_basics
assert
variable
86
from __future__ import annotations import pytest from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.constraints.version import VersionUnion from poetry.core.constraints.version import parse_constraint @pytest.mark.parametrize( ("ranges", ...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_metadata.py
test_requires_python
assert
variable
28
from __future__ import annotations import pytest from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage @pytest.mark.parametrize( ("requires_python", "python", "expected"), [ (">=3.8", None, ">=3.8"), (None, "^3.8", ">=3.8,<4.0"), ...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_api.py
test_get_requires_for_build_wheel
assert
variable
32
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.masonry import api from poetry.core.utils.helpers import temporar...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_api.py
test_build_editable_wheel
assert
variable
45
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.masonry import api from poetry.core.utils.helpers import temporar...
namelist
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_to_pep_508_with_patch_python_version
assert
variable
36
from __future__ import annotations from contextlib import AbstractContextManager from contextlib import nullcontext from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency impo...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_mutable_attributes_not_in_hash
assert
variable
42
from __future__ import annotations from contextlib import AbstractContextManager from contextlib import nullcontext from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency impo...
ref_hash
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_directory_dependency.py
test_directory_dependency_string_representation
assert
variable
58
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency DIST_PATH = Path(__file__).parent.parent / "fixtures" / ...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_file_dependency.py
test_file_dependency_string_representation
assert
variable
69
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.file_dependency import FileDependency from poetry.core.version.markers import SingleMarker DIST_PATH = P...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_specification.py
test_is_same_package_source_type
assert
variable
23
from __future__ import annotations import pytest from poetry.core.packages.specification import PackageSpecification @pytest.mark.parametrize( "spec1, spec2, expected", [ (PackageSpecification("a"), PackageSpecification("a"), True), (PackageSpecification("a", "type1"), PackageSpecification("a...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_url_dependency.py
test_to_pep_508
assert
variable
19
from __future__ import annotations import pytest from poetry.core.packages.url_dependency import URLDependency from poetry.core.version.markers import SingleMarker def test_to_pep_508() -> None: dependency = URLDependency( "pytorch", "https://download.pytorch.org/whl/cpu/torch-1.5.1%2Bcpu-cp38-cp...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_vcs_dependency.py
test_to_pep_508
assert
variable
58
from __future__ import annotations from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.packages.vcs_dependency import VCSDependency @pytest.mark.parametrize( "kwargs, expected", [ ({}, "poetry @ git+https://github.com/python-poetry/poetry.git"), ...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils.py
test_convert_markers
assert
variable
89
from __future__ import annotations from pathlib import Path import pytest from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_version_constraint from poetry.core.constraints.version import parse_marker_version_...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/test_factory.py
test_create_poetry_classifiers
assert
variable
204
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import cast import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version import parse_constraint from poetry.core.factory import Factory from poetry.cor...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/testutils.py
validate_wheel_contents
assert
variable
77
from __future__ import annotations import shutil import subprocess import sys import tarfile import tempfile import zipfile from contextlib import contextmanager from pathlib import Path from typing import Any from typing import Generator import tomli_w from poetry.core.utils._compat import tomllib __toml_build_ba...
namelist
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/utils/test_helpers.py
test_parse_requires
assert
variable
87
from __future__ import annotations import os import sys import tempfile from pathlib import Path from stat import S_IREAD from typing import TYPE_CHECKING import pytest from poetry.core.utils.helpers import combine_unicode from poetry.core.utils.helpers import parse_requires from poetry.core.utils.helpers import re...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/utils/test_helpers.py
test_robust_rmtree
pytest.raises
variable
37
from __future__ import annotations import os import sys import tempfile from pathlib import Path from stat import S_IREAD from typing import TYPE_CHECKING import pytest from poetry.core.utils.helpers import combine_unicode from poetry.core.utils.helpers import parse_requires from poetry.core.utils.helpers import re...
OSError)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_segments.py
test_release_next_major
assert
variable
14
from __future__ import annotations import pytest from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag from poetry.core.version.pep440.segments import RELEASE_PHASE_NORMALIZATIONS @pytest.mark.parametrize("precision", list(range(1, 6))) def test_release_next_major(precision...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_segments.py
test_release_equal_zero_padding
assert
variable
17
from __future__ import annotations import pytest from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag from poetry.core.version.pep440.segments import RELEASE_PHASE_NORMALIZATIONS @pytest.mark.parametrize("precision1", range(1, 6)) @pytest.mark.parametrize("precision2", ran...
release2
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_segments.py
test_release_equal_zero_padding
assert
variable
18
from __future__ import annotations import pytest from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag from poetry.core.version.pep440.segments import RELEASE_PHASE_NORMALIZATIONS @pytest.mark.parametrize("precision1", range(1, 6)) @pytest.mark.parametrize("precision2", ran...
release1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_version.py
test_is_prerelease
assert
variable
27
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.version.exceptions import InvalidVersion from poetry.core.version.pep440 import PEP440Version from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag @pytest.mark.parametrize( ...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_markers.py
test_single_marker_intersect_extras
assert
variable
46
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import UnionConstraint from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_versi...
expected
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_mutable_attributes_not_in_hash
assert
variable
41
from __future__ import annotations from contextlib import AbstractContextManager from contextlib import nullcontext from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency impo...
ref_value
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/vcs/test_vcs.py
test_get_vcs_encoding
assert
variable
38
from __future__ import annotations import os import subprocess from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.utils._compat import WINDOWS from poetry.core.vcs import get_vcs from poetry.core.vcs.git import Git from poetry.core.vcs.git import GitError...
repo_path
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/vcs/test_vcs.py
test_git_clone_raises_error_on_invalid_repository
pytest.raises
variable
30
from __future__ import annotations import os import subprocess from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.utils._compat import WINDOWS from poetry.core.vcs import get_vcs from poetry.core.vcs.git import Git from poetry.core.vcs.git import GitError...
GitError)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_segments.py
test_release_precision
assert
variable
16
from __future__ import annotations import pytest from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag from poetry.core.version.pep440.segments import RELEASE_PHASE_NORMALIZATIONS @pytest.mark.parametrize("precision", list(range(1, 6))) def test_release_precision(precision:...
precision
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/generic/test_constraint.py
test_invert
assert
variable
28
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import AnyConstraint from poetry.core.constraints.generic import Constraint from poetry.core.constraints.generic import EmptyConstraint from poetry.core.constraints.generic import MultiConstraint fr...
constraint
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/generic/test_main.py
test_parse_constraint
assert
variable
26
from __future__ import annotations import pytest from poetry.core.constraints.generic import AnyConstraint from poetry.core.constraints.generic import Constraint from poetry.core.constraints.generic import MultiConstraint from poetry.core.constraints.generic import UnionConstraint from poetry.core.constraints.generic...
constraint
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_comparison
assert
complex_expr
94
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
i < j
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_comparison
assert
complex_expr
95
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
i > j
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_complete.py
test_complete
assert
complex_expr
59
from __future__ import annotations import csv import os import platform import re import shutil import sys import tarfile import tempfile import zipfile from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.factory im...
0o644
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_comparison
assert
complex_expr
96
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
i <= j
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_comparison
assert
complex_expr
97
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
i >= j
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version.py
test_comparison
assert
complex_expr
98
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.version.exceptions import InvalidVersion from poe...
i == j
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_requirements.py
assert_requirement
assert
complex_expr
26
from __future__ import annotations import re from typing import Any import pytest from poetry.core.constraints.version import parse_constraint from poetry.core.version.requirements import InvalidRequirement from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, n...
req.url
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_requirements.py
assert_requirement
assert
complex_expr
25
from __future__ import annotations import re from typing import Any import pytest from poetry.core.constraints.version import parse_constraint from poetry.core.version.requirements import InvalidRequirement from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, n...
req.name
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/integration/test_pep517.py
test_pip_wheel_build
assert
complex_expr
22
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from build.__main__ import build_package from build.util import project_wheel_metadata from tests.testutils import subprocess_run from tests.testutils import temporary_project_directory pytestmark = pytest.ma...
pip.stdout
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/vcs/test_vcs.py
test_parse_url
assert
complex_expr
286
from __future__ import annotations import os import subprocess from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.utils._compat import WINDOWS from poetry.core.vcs import get_vcs from poetry.core.vcs.git import Git from poetry.core.vcs.git import GitError...
parsed.rev
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/vcs/test_vcs.py
test_parse_url
assert
complex_expr
287
from __future__ import annotations import os import subprocess from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.utils._compat import WINDOWS from poetry.core.vcs import get_vcs from poetry.core.vcs.git import Git from poetry.core.vcs.git import GitError...
parsed.url
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/generic/test_constraint.py
test_intersect
assert
complex_expr
276
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import AnyConstraint from poetry.core.constraints.generic import Constraint from poetry.core.constraints.generic import EmptyConstraint from poetry.core.constraints.generic import MultiConstraint fr...
expected[0]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/generic/test_constraint.py
test_intersect
assert
complex_expr
277
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import AnyConstraint from poetry.core.constraints.generic import Constraint from poetry.core.constraints.generic import EmptyConstraint from poetry.core.constraints.generic import MultiConstraint fr...
expected[1]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_wheel.py
test_dist_info_file_permissions
assert
complex_expr
58
from __future__ import annotations import importlib.machinery import os import re import shutil import zipfile from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Iterator from typing import TextIO import pytest from poetry.core.factory import Factory from poetry.core...
0o644 << 16
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/vcs/test_vcs.py
test_parse_url
assert
complex_expr
281
from __future__ import annotations import os import subprocess from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.utils._compat import WINDOWS from poetry.core.vcs import get_vcs from poetry.core.vcs.git import Git from poetry.core.vcs.git import GitError...
parsed.name
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/vcs/test_vcs.py
test_parse_url
assert
complex_expr
283
from __future__ import annotations import os import subprocess from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from poetry.core.utils._compat import WINDOWS from poetry.core.vcs import get_vcs from poetry.core.vcs.git import Git from poetry.core.vcs.git import GitError...
parsed.port
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_api.py
test_build_wheel_with_bad_path_dep_succeeds
assert
complex_expr
36
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.masonry import api from poetry.core.utils.helpers import temporar...
record.message
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_directory_dependency.py
test_directory_dependency_does_not_exist
assert
complex_expr
25
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency DIST_PATH = Path(__file__).parent.parent / "fixtures" / ...
record.message
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_file_dependency.py
test_file_dependency_does_not_exist
assert
complex_expr
26
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.file_dependency import FileDependency from poetry.core.version.markers import SingleMarker DIST_PATH = P...
record.message
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_requirements.py
assert_requirement
assert
complex_expr
28
from __future__ import annotations import re from typing import Any import pytest from poetry.core.constraints.version import parse_constraint from poetry.core.version.requirements import InvalidRequirement from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, n...
req.constraint
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/integration/test_pep517.py
test_pip_install_no_binary
assert
complex_expr
29
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from build.__main__ import build_package from build.util import project_wheel_metadata from tests.testutils import subprocess_run from tests.testutils import temporary_project_directory pytestmark = pytest.ma...
pip_show.stdout
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/integration/test_pep517_backend.py
test_pip_install
assert
complex_expr
53
from __future__ import annotations import shutil from pathlib import Path import pytest from tests.testutils import subprocess_run pytestmark = pytest.mark.integration BUILD_SYSTEM_TEMPLATE = """ [build-system] requires = ["poetry-core @ file://{project_path}"] build-backend = "poetry.core.masonry.api" """ def t...
pip_show.stdout
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_markers.py
test_multi_marker_intersect_with_union_drops_union
assert
func_call
31
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import UnionConstraint from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_versi...
str(m)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_api.py
test_prepare_metadata_for_build_wheel
assert
func_call
96
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.masonry import api from poetry.core.utils.helpers import temporar...
f.read()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_markers.py
test_single_marker_normalisation
assert
func_call
32
from __future__ import annotations import os from typing import TYPE_CHECKING import pytest from poetry.core.constraints.generic import UnionConstraint from poetry.core.constraints.generic import parse_constraint as parse_generic_constraint from poetry.core.constraints.version import parse_constraint as parse_versi...
hash(m2)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_urls.py
test_url_to_path_path_to_url_symmetry_win
assert
func_call
16
from __future__ import annotations import sys from pathlib import Path import pytest from poetry.core.packages.utils.utils import path_to_url from poetry.core.packages.utils.utils import url_to_path @pytest.mark.skipif("sys.platform != 'win32'") def test_url_to_path_path_to_url_symmetry_win() -> None: path = r...
Path(path)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_specification.py
test_equal_specifications_have_same_hash
assert
func_call
43
from __future__ import annotations import pytest from poetry.core.packages.specification import PackageSpecification @pytest.mark.parametrize( "spec1, spec2", [ ( # nothing except for name and features matters if no source PackageSpecification("a", None, "url1", "ref1", "resre...
hash(spec2)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_wheel.py
test_wheel_module
assert
func_call
59
from __future__ import annotations import importlib.machinery import os import re import shutil import zipfile from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Iterator from typing import TextIO import pytest from poetry.core.factory import Factory from poetry.core...
z.namelist()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_missing_script_files_throws_error
assert
func_call
25
from __future__ import annotations import sys from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.factory import Factory from poetry.core.masonry.builders.builder import Builder def test_missing_script_files_throws_error() -> None: builder = ...
str(err.value)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_complete.py
test_wheel_c_extension
assert
func_call
61
from __future__ import annotations import csv import os import platform import re import shutil import sys import tarfile import tempfile import zipfile from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.factory im...
tar.getnames()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_urls.py
test_url_to_path_path_to_url_symmetry_win
assert
func_call
19
from __future__ import annotations import sys from pathlib import Path import pytest from poetry.core.packages.utils.utils import path_to_url from poetry.core.packages.utils.utils import url_to_path @pytest.mark.skipif("sys.platform != 'win32'") def test_url_to_path_path_to_url_symmetry_win() -> None: path = r...
Path(unc_path)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_requirements.py
assert_requirement
assert
func_call
31
from __future__ import annotations import re from typing import Any import pytest from poetry.core.constraints.version import parse_constraint from poetry.core.version.requirements import InvalidRequirement from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, n...
str(req.marker)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_vcs_dependency.py
test_category
assert
func_call
20
from __future__ import annotations from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.packages.vcs_dependency import VCSDependency @pytest.mark.parametrize("groups", [["main"], ["dev"]]) def test_category(groups: list[str]) -> None: dependency = VCSDependency( ...
frozenset(groups)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_unparseable_pyproject_toml
assert
func_call
23
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectException from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils._compat import tomllib def test_unparseable_pyproject_toml() -> None: pyproject_toml = ( P...
str(excval.value)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/pep440/test_segments.py
test_release_tag_normalisation
assert
func_call
30
from __future__ import annotations import pytest from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag from poetry.core.version.pep440.segments import RELEASE_PHASE_NORMALIZATIONS @pytest.mark.parametrize( "parts,result", [ (("a",), ReleaseTag("alpha", 0)), ...
result.to_string()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/version/test_requirements.py
assert_requirement
assert
func_call
27
from __future__ import annotations import re from typing import Any import pytest from poetry.core.constraints.version import parse_constraint from poetry.core.version.requirements import InvalidRequirement from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, n...
sorted(req.extras)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_urls.py
test_url_to_path
assert
func_call
36
from __future__ import annotations import sys from pathlib import Path import pytest from poetry.core.packages.utils.utils import path_to_url from poetry.core.packages.utils.utils import url_to_path @pytest.mark.parametrize( "url,win_expected,non_win_expected", [ ("file:tmp", "tmp", "tmp"), ...
Path(expected_path)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_metadata_license_type_file
assert
func_call
42
from __future__ import annotations import sys from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.factory import Factory from poetry.core.masonry.builders.builder import Builder @pytest.mark.parametrize("license_type", ["file", "text", "str"]) de...
license_text.rstrip()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_url_dependency.py
test_to_pep_508_with_extras
assert
func_call
20
from __future__ import annotations import pytest from poetry.core.packages.url_dependency import URLDependency from poetry.core.version.markers import SingleMarker def test_to_pep_508_with_extras() -> None: dependency = URLDependency( "pytorch", "https://download.pytorch.org/whl/cpu/torch-1.5.1%2...
dependency.to_pep_508()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/constraints/version/test_version_range.py
test_union
assert
func_call
102
from __future__ import annotations import pytest from poetry.core.constraints.version import EmptyConstraint from poetry.core.constraints.version import Version from poetry.core.constraints.version import VersionRange from poetry.core.constraints.version import parse_constraint def v003() -> Version: return Vers...
VersionRange(v003, v200)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency_group.py
test_dependencies
assert
func_call
62
from __future__ import annotations from pathlib import Path import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core.packages.vcs_dependency import ...
set(expected_dependencies)
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_builder_find_invalid_case_sensitive_excluded_files
assert
func_call
31
from __future__ import annotations import sys from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core.factory import Factory from poetry.core.masonry.builders.builder import Builder @pytest.mark.xfail( sys.platform == "win32", reason="Windows...
builder.find_excluded_files()
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/integration/test_pep517.py
test_pep517_build_sdist
assert
numeric_literal
26
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from build.__main__ import build_package from build.util import project_wheel_metadata from tests.testutils import subprocess_run from tests.testutils import temporary_project_directory pytestmark = pytest.ma...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/integration/test_pep517.py
test_pip_wheel_build
assert
numeric_literal
24
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from build.__main__ import build_package from build.util import project_wheel_metadata from tests.testutils import subprocess_run from tests.testutils import temporary_project_directory pytestmark = pytest.ma...
0
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/json/test_poetry_schema.py
test_non_package_mode_no_metadata
assert
numeric_literal
38
from __future__ import annotations from typing import Any import pytest from poetry.core.json import validate_object def base_object() -> dict[str, Any]: return { "name": "myapp", "version": "1.0.0", "description": "Some description.", "authors": ["Your Name <you@example.com>"], ...
0
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/json/test_poetry_schema.py
test_invalid_mode
assert
numeric_literal
38
from __future__ import annotations from typing import Any import pytest from poetry.core.json import validate_object def base_object() -> dict[str, Any]: return { "name": "myapp", "version": "1.0.0", "description": "Some description.", "authors": ["Your Name <you@example.com>"], ...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_sdist.py
test_sdist_reproducibility
assert
numeric_literal
60
from __future__ import annotations import ast import gzip import hashlib import shutil import tarfile from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Iterator import pytest from packaging.utils import canonicalize_name from poetry....
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_sdist.py
test_default_with_excluded_data
assert
numeric_literal
110
from __future__ import annotations import ast import gzip import hashlib import shutil import tarfile from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import Iterator import pytest from packaging.utils import canonicalize_name from poetry....
0
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_api.py
test_build_wheel_with_bad_path_dep_succeeds
assert
numeric_literal
33
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core import __version__ from poetry.core.masonry import api from poetry.core.utils.helpers import temporar...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/test_builder.py
test_builder_creates_places_built_files_in_specified_directory
assert
numeric_literal
42
from __future__ import annotations import shutil import warnings from contextlib import contextmanager from pathlib import Path from typing import TYPE_CHECKING from typing import Iterator import pytest from poetry.core.factory import Factory def get_project(name: str) -> Path: project_directory = Path(__file_...
0
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_directory_dependency.py
test_directory_dependency_does_not_exist
assert
numeric_literal
22
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency DIST_PATH = Path(__file__).parent.parent / "fixtures" / ...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_file_dependency.py
test_file_dependency_does_not_exist
assert
numeric_literal
23
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.packages.dependency import Dependency from poetry.core.packages.file_dependency import FileDependency from poetry.core.version.markers import SingleMarker DIST_PATH = P...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_with_extra
assert
numeric_literal
19
from __future__ import annotations from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.constraints.version import Version from poetry.core.packages.dependency import Dependency def test_dependency_with_extra() -> None: name = "requests[security] (==2.18.0)" dep = Dependen...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_package.py
test_package_clone
assert
numeric_literal
60
from __future__ import annotations import random from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from poetry.core.constraints.version import Version from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.factory import Factory fro...
1
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor