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
python-poetry/poetry-core
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...
union
assert
variable
tests/version/test_markers.py
test_union_of_a_single_marker_is_the_single_marker
1,834
null
python-poetry/poetry-core
from __future__ import annotations import ast import gzip import hashlib import logging import shutil import tarfile from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.factory ...
names
assert
variable
tests/masonry/builders/test_sdist.py
test_default_with_excluded_data
519
null
python-poetry/poetry-core
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 InvalidRequirementError from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, ...
req.constraint
assert
complex_expr
tests/version/test_requirements.py
assert_requirement
28
null
python-poetry/poetry-core
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_from_pep_508_with_single_python_version() -> None: name = 'requests (==2.18.0);...
"~2.7"
assert
string_literal
tests/packages/test_main.py
test_dependency_from_pep_508_with_single_python_version
87
null
python-poetry/poetry-core
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core....
">3.6,<=3.10"
assert
string_literal
tests/packages/test_dependency.py
test_python_versions_are_made_precise
43
null
python-poetry/poetry-core
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...
m2
assert
variable
tests/version/test_markers.py
test_single_marker_normalisation
163
null
python-poetry/poetry-core
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
assert
variable
tests/constraints/generic/test_main.py
test_parse_constraint
30
null
python-poetry/poetry-core
from __future__ import annotations import ast import gzip import hashlib import logging import shutil import tarfile from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.factory ...
ns
assert
variable
tests/masonry/builders/test_sdist.py
test_default_with_excluded_data
502
null
python-poetry/poetry-core
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
assert
variable
tests/constraints/version/test_version_union.py
test_excludes_single_wildcard_range_basics
86
null
python-poetry/poetry-core
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
assert
variable
tests/packages/utils/test_utils.py
test_convert_markers
89
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from packaging.licenses import canonicalize_license_expression from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage from poetry.core.spdx.helpers im...
("sub/LICENSE",)
assert
collection
tests/masonry/test_metadata.py
test_from_package_license_files_path
145
null
python-poetry/poetry-core
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_pep_561_stub_only_package_bad_name_suffix() -> None: with pyte...
"bad is not a package."
assert
string_literal
tests/masonry/utils/test_package_include.py
test_pep_561_stub_only_package_bad_name_suffix
91
null
python-poetry/poetry-core
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 InvalidVersionError fro...
range
assert
variable
tests/constraints/version/test_version.py
test_union
494
null
python-poetry/poetry-core
from __future__ import annotations import ast import gzip import hashlib import logging import shutil import tarfile from email.parser import Parser from pathlib import Path from typing import TYPE_CHECKING from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.factory ...
0
assert
numeric_literal
tests/masonry/builders/test_sdist.py
test_sdist_mtime_zero
724
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from packaging.licenses import canonicalize_license_expression from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage from poetry.core.spdx.helpers im...
None
assert
none_literal
tests/masonry/test_metadata.py
test_from_package_license_expression
97
null
python-poetry/poetry-core
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]
assert
complex_expr
tests/constraints/generic/test_constraint.py
test_intersect
600
null
python-poetry/poetry-core
from __future__ import annotations import csv import platform import re import shutil import sys import tarfile import tempfile import zipfile from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.factory import Factory from poetry.core.masonry....
names
assert
variable
tests/masonry/builders/test_complete.py
test_package_with_include
328
null
python-poetry/poetry-core
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()
assert
func_call
tests/version/pep440/test_segments.py
test_release_tag_normalisation
138
null
python-poetry/poetry-core
from __future__ import annotations import csv import platform import re import shutil import sys import tarfile import tempfile import zipfile from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.factory import Factory from poetry.core.masonry....
0o644
assert
complex_expr
tests/masonry/builders/test_complete.py
test_complete
124
null
python-poetry/poetry-core
from __future__ import annotations import shutil from collections import defaultdict 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...
4
assert
numeric_literal
tests/test_factory.py
test_create_poetry_with_included_groups_only
1,975
null
python-poetry/poetry-core
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from tempfile import TemporaryDirectory from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.masonry import api from tests.testutils import valida...
record.message
assert
complex_expr
tests/masonry/test_api.py
test_build_wheel_with_bad_path_dep_succeeds
114
null
python-poetry/poetry-core
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...
range
assert
variable
tests/constraints/version/test_version_range.py
test_union
353
null
python-poetry/poetry-core
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]
assert
complex_expr
tests/constraints/generic/test_constraint.py
test_intersect
601
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from poetry.core.utils.helpers import combine_unicode from poetry.core.utils.helpers import parse_requires from poetry.core.utils.helpers import readme_content_type def test_parse_requires() -> None: requires = """\ jsonschema>=2.6.0.0,<3...
expected
assert
variable
tests/utils/test_helpers.py
test_parse_requires
79
null
python-poetry/poetry-core
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.version.exceptions import InvalidVersionError from poetry.core.version.pep440 import PEP440Version from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag @pytest.mark.parametr...
expected
assert
variable
tests/version/pep440/test_version.py
test_is_prerelease
162
null
python-poetry/poetry-core
from __future__ import annotations import csv import platform import re import shutil import sys import tarfile import tempfile import zipfile from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.factory import Factory from poetry.core.masonry....
tar.getnames()
assert
func_call
tests/masonry/builders/test_complete.py
test_wheel_c_extension
68
null
python-poetry/poetry-core
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 InvalidRequirementError from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, ...
sorted(req.extras)
assert
func_call
tests/version/test_requirements.py
assert_requirement
27
null
python-poetry/poetry-core
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 GitUrl f...
parsed.user
assert
complex_expr
tests/vcs/test_vcs.py
test_parse_url
473
null
python-poetry/poetry-core
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_from_pep_508() -> None: name = "requests" dep = Dependency.create_from_pep_...
name
assert
variable
tests/packages/test_main.py
test_dependency_from_pep_508
21
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectError from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils._compat import tomllib def test_pyproject_toml_no_build_system_defaults() -> None: pyproject_toml = ( ...
"poetry-core"
assert
string_literal
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_no_build_system_defaults
87
null
python-poetry/poetry-core
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 from poetry.core.utils._compat import tomllib @pytest.mark.parametri...
metadata
assert
variable
tests/masonry/builders/test_builder.py
test_metadata_license_type_file
238
null
python-poetry/poetry-core
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
assert
numeric_literal
tests/packages/test_main.py
test_dependency_with_extra
164
null
python-poetry/poetry-core
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.version.exceptions import InvalidVersionError from poetry.core.version.pep440 import PEP440Version from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag @pytest.mark.parametr...
minor
assert
variable
tests/version/pep440/test_version.py
test_properties
142
null
python-poetry/poetry-core
from __future__ import annotations from typing import Any import pytest from packaging.utils import canonicalize_name from poetry.core.packages.vcs_dependency import VCSDependency def test_vcs_dependency_can_have_resolved_reference_specified() -> None: dependency = VCSDependency( "poetry", "git...
"123456"
assert
string_literal
tests/packages/test_vcs_dependency.py
test_vcs_dependency_can_have_resolved_reference_specified
212
null
python-poetry/poetry-core
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...
m
assert
variable
tests/version/test_markers.py
test_union_should_drop_markers_if_their_complement_is_present
1,900
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from packaging.utils import canonicalize_name from poetry.core.packages.dependency import Dependency from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.directory_dependency import DirectoryDependency f...
["bar"]
assert
collection
tests/packages/test_dependency_group.py
test_include_dependency_groups
581
null
python-poetry/poetry-core
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core....
"*"
assert
string_literal
tests/packages/test_dependency.py
test_marker_properly_unsets_python_constraint
386
null
python-poetry/poetry-core
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...
parts
assert
variable
tests/version/pep440/test_segments.py
test_release_from_parts_to_parts
56
null
python-poetry/poetry-core
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 from poetry.core.utils._compat import tomllib @pytest.mark.parametri...
"1.2.3"
assert
string_literal
tests/masonry/builders/test_builder.py
test_get_metadata_content
121
null
python-poetry/poetry-core
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 InvalidVersionError fro...
i == j
assert
complex_expr
tests/constraints/version/test_version.py
test_comparison
291
null
python-poetry/poetry-core
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)
assert
func_call
tests/version/test_markers.py
test_single_marker_normalisation
164
null
python-poetry/poetry-core
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
assert
variable
tests/constraints/generic/test_constraint.py
test_invert
293
null
python-poetry/poetry-core
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
assert
numeric_literal
tests/json/test_poetry_schema.py
test_invalid_mode
51
null
python-poetry/poetry-core
from __future__ import annotations import sys 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 / "...
1
assert
numeric_literal
tests/packages/test_directory_dependency.py
test_directory_dependency_does_not_exist
30
null
python-poetry/poetry-core
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...
output
assert
variable
tests/constraints/version/test_parse_constraint.py
test_parse_constraint_multi_with_epochs
350
null
python-poetry/poetry-core
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 from poetry.core.utils._compat import tomllib @pytest.mark.parametri...
None
assert
none_literal
tests/masonry/builders/test_builder.py
test_get_metadata_content
137
null
python-poetry/poetry-core
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)
assert
func_call
tests/packages/test_specification.py
test_equal_specifications_have_same_hash
117
null
python-poetry/poetry-core
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_from_pep_508_with_git_url() -> None: name = "django-utils @ git+ssh://git@corp-...
"git"
assert
string_literal
tests/packages/test_main.py
test_dependency_from_pep_508_with_git_url
207
null
python-poetry/poetry-core
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 InvalidRequirementError from poetry.core.version.requirements import Requirement def assert_requirement( req: Requirement, ...
req)
assert_*
variable
tests/version/test_requirements.py
test_requirement
126
null
python-poetry/poetry-core
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 from poetry.core.utils._compat import tomllib @pytest.mark.parametri...
"special"
assert
string_literal
tests/masonry/builders/test_builder.py
test_metadata_license_type_file
254
null
python-poetry/poetry-core
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...
type(constraint)
assert
func_call
tests/constraints/generic/test_main.py
test_parse_extra_constraint
102
null
python-poetry/poetry-core
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core....
{"bar", "baz"}
assert
collection
tests/packages/test_dependency.py
test_with_constraint
340
null
python-poetry/poetry-core
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
assert
variable
tests/packages/utils/test_utils.py
test_is_python_project
263
null
python-poetry/poetry-core
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)
assert
func_call
tests/packages/utils/test_utils_urls.py
test_url_to_path
55
null
python-poetry/poetry-core
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...
spec1
assert
variable
tests/packages/test_specification.py
test_equal_specifications_have_same_hash
116
null
python-poetry/poetry-core
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from tempfile import TemporaryDirectory from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.masonry import api from tests.testutils import valida...
namelist
assert
variable
tests/masonry/test_api.py
test_build_editable_wheel
435
null
python-poetry/poetry-core
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 InvalidVersionError fro...
i >= j
assert
complex_expr
tests/constraints/version/test_version.py
test_comparison
290
null
python-poetry/poetry-core
from tests.masonry.builders.fixtures.excluded_subpackage.example import __version__ def test_version() -> None: assert __version__ ==
"0.1.0"
assert
string_literal
tests/masonry/builders/fixtures/excluded_subpackage/example/test/excluded.py
test_version
5
null
python-poetry/poetry-core
from __future__ import annotations from typing import TYPE_CHECKING import pytest from poetry.core.version.exceptions import InvalidVersionError from poetry.core.version.pep440 import PEP440Version from poetry.core.version.pep440 import Release from poetry.core.version.pep440 import ReleaseTag @pytest.mark.parametr...
parts
assert
variable
tests/version/pep440/test_version.py
test_properties
145
null
python-poetry/poetry-core
from __future__ import annotations import sys 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 / "...
expected
assert
variable
tests/packages/test_directory_dependency.py
test_directory_dependency_string_representation
200
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from packaging.licenses import canonicalize_license_expression from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage from poetry.core.spdx.helpers im...
expected
assert
variable
tests/masonry/test_metadata.py
test_from_package_requires_python
81
null
python-poetry/poetry-core
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core....
"^1.0"
assert
string_literal
tests/packages/test_dependency.py
test_set_constraint_sets_pretty_constraint
304
null
python-poetry/poetry-core
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from tempfile import TemporaryDirectory from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.masonry import api from tests.testutils import valida...
expected
assert
variable
tests/masonry/test_api.py
test_get_requires_for_build_wheel
42
null
python-poetry/poetry-core
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 from poetry.core.utils._compat import tomllib @pytest.mark.parametri...
"MIT"
assert
string_literal
tests/masonry/builders/test_builder.py
test_get_metadata_content
128
null
python-poetry/poetry-core
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 from poetry.core.utils._compat import tomllib def test_missing_scrip...
str(err.value)
assert
func_call
tests/masonry/builders/test_builder.py
test_missing_script_files_throws_error
298
null
python-poetry/poetry-core
from __future__ import annotations import pytest from poetry.core.spdx.helpers import _load_licenses from poetry.core.spdx.helpers import license_by_id def test_license_by_id_custom() -> None: license = license_by_id("Custom") assert license.id ==
"Custom"
assert
string_literal
tests/spdx/test_helpers.py
test_license_by_id_custom
52
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectError from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils._compat import tomllib def test_pyproject_toml_no_build_system_defaults() -> None: pyproject_toml = ( ...
["poetry-core", "Cython~=0.29.6"]
assert
collection
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_no_build_system_defaults
84
null
python-poetry/poetry-core
from __future__ import annotations import csv import platform import re import shutil import sys import tarfile import tempfile import zipfile from pathlib import Path from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.factory import Factory from poetry.core.masonry....
None
assert
none_literal
tests/masonry/builders/test_complete.py
test_wheel_c_extension
82
null
python-poetry/poetry-core
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
assert
numeric_literal
tests/json/test_poetry_schema.py
test_non_package_mode_no_metadata
42
null
python-poetry/poetry-core
from __future__ import annotations import uuid from datetime import datetime from datetime import timezone from hashlib import sha256 import pytest from poetry.core.packages.utils.link import Link def make_checksum() -> str: return sha256(str(uuid.uuid4()).encode()).hexdigest() def file_checksum() -> str: ...
expected
assert
variable
tests/packages/utils/test_utils_link.py
test_package_link_upload_time
204
null
python-poetry/poetry-core
from __future__ import annotations import random from pathlib import Path from typing import TYPE_CHECKING from typing import cast import pytest from packaging.licenses import canonicalize_license_expression from packaging.utils import canonicalize_name from poetry.core.constraints.version import Version from poet...
1
assert
numeric_literal
tests/packages/test_package.py
test_package_clone
486
null
python-poetry/poetry-core
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
assert
variable
tests/version/pep440/test_segments.py
test_release_next_major
82
null
python-poetry/poetry-core
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
assert
variable
tests/constraints/version/test_utils.py
test_constraint_regions
83
null
python-poetry/poetry-core
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
assert
variable
tests/version/pep440/test_segments.py
test_release_equal_zero_padding
33
null
python-poetry/poetry-core
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)
assert
func_call
tests/version/test_markers.py
test_multi_marker_intersect_with_union_drops_union
843
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from packaging.licenses import canonicalize_license_expression from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage from poetry.core.spdx.helpers im...
"MIT"
assert
string_literal
tests/masonry/test_metadata.py
test_from_package_license
106
null
python-poetry/poetry-core
from __future__ import annotations import sys 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 D...
path
assert
variable
tests/packages/test_file_dependency.py
_test_file_dependency_pep_508
80
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectError 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: st...
config
assert
variable
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_poetry_config
72
null
python-poetry/poetry-core
from __future__ import annotations import shutil from collections import defaultdict 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...
2
assert
numeric_literal
tests/test_factory.py
test_create_poetry_with_dependencies_with_subdirectory
390
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectError from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils._compat import tomllib def test_pyproject_toml_non_existent(pyproject_toml: Path) -> None: pyproject_t...
{}
assert
collection
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_non_existent
102
null
python-poetry/poetry-core
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...
a
assert
variable
tests/constraints/version/test_version_range.py
test_intersect
329
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from packaging.utils import canonicalize_name from poetry.core.packages.dependency import Dependency from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.directory_dependency import DirectoryDependency f...
["baz"]
assert
collection
tests/packages/test_dependency_group.py
test_include_dependency_groups
586
null
python-poetry/poetry-core
from __future__ import annotations import os import zipfile from contextlib import contextmanager from pathlib import Path from tempfile import TemporaryDirectory from typing import TYPE_CHECKING import pytest from poetry.core import __version__ from poetry.core.masonry import api from tests.testutils import valida...
metadata
assert
variable
tests/masonry/test_api.py
test_prepare_metadata_for_build_wheel
279
null
python-poetry/poetry-core
from __future__ import annotations import importlib.machinery import logging import os import re import shutil import zipfile from pathlib import Path from typing import TYPE_CHECKING from typing import Any from typing import TextIO import pytest from poetry.core.factory import Factory from poetry.core.masonry.buil...
z.namelist()
assert
func_call
tests/masonry/builders/test_wheel.py
test_wheel_module
73
null
python-poetry/poetry-core
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core....
marker
assert
variable
tests/packages/test_dependency.py
test_to_pep_508_with_python_versions
145
null
python-poetry/poetry-core
from __future__ import annotations import shutil from collections import defaultdict 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...
1
assert
numeric_literal
tests/test_factory.py
test_create_poetry_with_groups
350
null
python-poetry/poetry-core
from __future__ import annotations import sys 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 / "...
path
assert
variable
tests/packages/test_directory_dependency.py
_test_directory_dependency_pep_508
87
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from poetry.core.pyproject.exceptions import PyProjectError from poetry.core.pyproject.toml import PyProjectTOML from poetry.core.utils._compat import tomllib def test_pyproject_toml_simple( pyproject_toml: Path, build_system_section: str...
data
assert
variable
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_simple
17
null
python-poetry/poetry-core
from __future__ import annotations import pytest from packaging.utils import canonicalize_name from poetry.core.constraints.version.exceptions import ParseConstraintError from poetry.core.packages.dependency import Dependency from poetry.core.packages.directory_dependency import DirectoryDependency from poetry.core....
"foo[bar,baz]"
assert
string_literal
tests/packages/test_dependency.py
test_complete_name
240
null
python-poetry/poetry-core
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
assert
variable
tests/version/test_markers.py
test_union_of_multi_with_a_containing_single
1,842
null
python-poetry/poetry-core
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
assert
numeric_literal
tests/integration/test_pep517.py
test_pep517_build_sdist
51
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path import pytest from packaging.utils import canonicalize_name from poetry.core.packages.dependency import Dependency from poetry.core.packages.dependency_group import DependencyGroup from poetry.core.packages.directory_dependency import DirectoryDependency f...
["foo"]
assert
collection
tests/packages/test_dependency_group.py
test_include_empty_dependency_group
607
null
python-poetry/poetry-core
from __future__ import annotations import uuid from datetime import datetime from datetime import timezone from hashlib import sha256 import pytest from poetry.core.packages.utils.link import Link def make_checksum() -> str: return sha256(str(uuid.uuid4()).encode()).hexdigest() def file_checksum() -> str: ...
""
assert
string_literal
tests/packages/utils/test_utils_link.py
test_package_link_pep592_default_not_yanked
143
null
python-poetry/poetry-core
from __future__ import annotations import sys 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 / "...
"WARNING"
assert
string_literal
tests/packages/test_directory_dependency.py
test_directory_dependency_does_not_exist
32
null
python-poetry/poetry-core
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_path_to_url_win() -> None: assert path_to_url("c:/tmp/fi...
"file://unc/as/path"
assert
string_literal
tests/packages/utils/test_utils_urls.py
test_path_to_url_win
27
null
python-poetry/poetry-core
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
assert
variable
tests/constraints/generic/test_constraint.py
test_invert
294
null
python-poetry/poetry-core
from __future__ import annotations from pathlib import Path from typing import TYPE_CHECKING import pytest from packaging.licenses import canonicalize_license_expression from poetry.core.masonry.metadata import Metadata from poetry.core.packages.project_package import ProjectPackage from poetry.core.spdx.helpers im...
license
assert
variable
tests/masonry/test_metadata.py
test_from_package_license_expression
96
null
python-poetry/poetry-core
from __future__ import annotations import sys 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 D...
1
assert
numeric_literal
tests/packages/test_file_dependency.py
test_file_dependency_does_not_exist
32
null
python-poetry/poetry-core
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...
v123
assert
variable
tests/constraints/version/test_version_range.py
test_intersect
332
null
python-poetry/poetry-core
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
assert
variable
tests/version/test_markers.py
test_single_marker_intersect_is_single_marker
215
null