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/packages/test_package.py
test_package_clone
assert
numeric_literal
61
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...
2
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_package.py
test_dependency_groups
assert
numeric_literal
36
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...
4
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_package.py
test_without_dependency_groups
assert
numeric_literal
38
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...
3
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_package.py
test_only_with_dependency_groups
assert
numeric_literal
37
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...
0
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_pep592_default_not_yanked
assert
string_literal
41
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
""
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_marker_properly_unsets_python_constraint
assert
string_literal
25
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...
"*"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508
assert
string_literal
17
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_...
"*"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/test_factory.py
test_create_poetry
assert
string_literal
224
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...
"*"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_get_metadata_content
assert
string_literal
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_get_metadata_content() -> None: builder = Builder( ...
"2.3"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_get_metadata_content
assert
string_literal
33
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_get_metadata_content() -> None: builder = Builder( ...
"MIT"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_complete_name
assert
string_literal
19
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...
"foo"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508_with_git_url
assert
string_literal
20
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"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508_with_git_url
assert
string_literal
22
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-...
"1.2"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/spdx/test_helpers.py
test_license_by_id
assert
string_literal
11
from __future__ import annotations import pytest from poetry.core.spdx.helpers import license_by_id def test_license_by_id() -> None: license = license_by_id("MIT") assert license.id ==
"MIT"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/test_factory.py
test_create_poetry
assert
string_literal
165
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...
"MIT"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/test_factory.py
test_create_poetry
assert
string_literal
189
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...
"git"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/test_factory.py
test_create_poetry_with_dependencies_with_subdirectory
assert
string_literal
163
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...
"sub"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_set_constraint_sets_pretty_constraint
assert
string_literal
20
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...
"^1.0"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_set_constraint_sets_pretty_constraint
assert
string_literal
22
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...
"^2.0"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508_with_single_python_version
assert
string_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_from_pep_508_with_single_python_version() -> None: name = 'requests (==2.18.0);...
"~2.7"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/fixtures/excluded_subpackage/example/test/excluded.py
test_version
assert
string_literal
5
from tests.masonry.builders.fixtures.excluded_subpackage.example import __version__ def test_version() -> None: assert __version__ ==
"0.1.0"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_get_metadata_content
assert
string_literal
27
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_get_metadata_content() -> None: builder = Builder( ...
"1.2.3"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_marker_properly_unsets_python_constraint
assert
string_literal
22
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...
">=3.6"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508_with_git_url_and_comment_and_extra
assert
string_literal
25
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_and_comment_and_extra() -> None: name = ( "po...
"b;ar;"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_to_pep_508_wilcard
assert
string_literal
22
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...
"Django"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508_with_version
assert
string_literal
17
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_version() -> None: name = "requests==2.18.0" dep = Depend...
"2.18.0"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_vcs_dependency.py
test_vcs_dependency_can_have_resolved_reference_specified
assert
string_literal
23
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"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_hash
assert
string_literal
41
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
"sha256"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/spdx/test_helpers.py
test_license_by_id_custom
assert
string_literal
11
from __future__ import annotations import pytest 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"
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
string_literal
46
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...
"special"
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
string_literal
35
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...
"WARNING"
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
string_literal
24
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" / ...
"WARNING"
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
string_literal
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.file_dependency import FileDependency from poetry.core.version.markers import SingleMarker DIST_PATH = P...
"WARNING"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_vcs_dependency.py
test_vcs_dependency_can_have_resolved_reference_specified
assert
string_literal
21
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...
"develop"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_sdist.py
test_proper_python_requires_if_three_digits_precision_version_specified
assert
string_literal
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....
"==2.7.15"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_get_metadata_content
assert
string_literal
26
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_get_metadata_content() -> None: builder = Builder( ...
"my-package"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_metadata_pretty_name
assert
string_literal
22
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_metadata_pretty_name() -> None: builder = Builder( ...
"Pretty.Name"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_no_build_system_defaults
assert
string_literal
24
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_no_build_system_defaults() -> None: pyproject_toml ...
"poetry-core"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/spdx/test_helpers.py
test_license_by_id
assert
string_literal
12
from __future__ import annotations import pytest from poetry.core.spdx.helpers import license_by_id def test_license_by_id() -> None: license = license_by_id("MIT") assert license.id == "MIT" assert license.name ==
"MIT License"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_complete_name
assert
string_literal
20
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...
"foo[bar,baz]"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_hash
assert
string_literal
44
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
"demo-1.0.0.whl"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/utils/test_helpers.py
test_temporary_directory_python_3_9_or_older
assert
string_literal
29
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...
"hello from test"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_urls.py
test_path_to_url_unix
assert
string_literal
15
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_unix() -> None: assert path_to_url("/tmp/fi...
"file:///tmp/file"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/spdx/test_helpers.py
test_license_by_id
assert
string_literal
18
from __future__ import annotations import pytest from poetry.core.spdx.helpers import license_by_id def test_license_by_id() -> None: license = license_by_id("MIT") assert license.id == "MIT" assert license.name == "MIT License" assert license.is_osi_approved assert not license.is_deprecated ...
"LGPL-3.0-or-later"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_urls.py
test_path_to_url_win
assert
string_literal
17
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"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_urls.py
test_path_to_url_win
assert
string_literal
15
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/f...
"file:///c:/tmp/file"
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_metadata_homepage_default
assert
none_literal
22
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_metadata_homepage_default() -> None: builder = Builder(...
None
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
none_literal
75
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...
None
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_sdist.py
test_find_packages
assert
none_literal
55
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....
None
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_wheel.py
test_wheel_file_is_closed
assert
none_literal
67
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...
None
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_hashes
assert
none_literal
41
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
None
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_non_existent
assert
collection
17
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_non_existent(pyproject_toml: Path) -> None: pyproje...
{}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency_group.py
test_remove_dependency_removes_from_both_lists
assert
collection
47
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 ...
{"bar"}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency_group.py
test_remove_dependency_removes_from_both_lists
assert
collection
48
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 ...
{"baz"}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_main.py
test_dependency_from_pep_508_complex
assert
collection
23
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_complex() -> None: name = ( "requests (==2.18.0); " ...
["foo"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/test_factory.py
test_create_poetry_with_markers_and_extras
assert
collection
161
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...
["all"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_builder.py
test_get_metadata_content
assert
collection
53
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_get_metadata_content() -> None: builder = Builder( ...
["time"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/masonry/builders/test_sdist.py
test_find_packages
assert
collection
79
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....
{"": ["*"]}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/test_dependency.py
test_with_constraint
assert
collection
44
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...
{"bar", "baz"}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_non_existent
assert
collection
18
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_non_existent(pyproject_toml: Path) -> None: pyproje...
["poetry-core"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_build_requires_as_dependencies
assert
collection
14
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_build_requires_as_dependencies(pyproject_toml: Path) ->...
["setuptools", "wheel"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_hash
assert
collection
39
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
{"sha256": file_checksum}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_pep658
assert
collection
49
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
{"sha256": metadata_checksum}
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_simple_dir
assert
collection
15
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_simple_dir() -> None: pkg_include = Packa...
[with_includes / "bar/baz.py"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/pyproject/test_pyproject_toml.py
test_pyproject_toml_no_build_system_defaults
assert
collection
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_no_build_system_defaults() -> None: pyproject_toml ...
["poetry-core", "Cython~=0.29.6"]
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_pep691
assert
collection
42
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
{"sha256": "abcd", "sha512": "1234"}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
python-poetry/poetry-core
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
train
train
tests/packages/utils/test_utils_link.py
test_package_link_hashes
assert
collection
39
from __future__ import annotations import uuid 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: return make_checksum() def metadata_checksum() -> str: ...
{"sha256": file_checksum, "other": "1234"}
4eb24d9fe5eb6d8861c5ffd14f88328409587d3c
352
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_len
assert
numeric_literal
19
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() def test_len(): trie = marisa_trie.BinaryTrie() assert len(t...
0
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_len
assert
numeric_literal
22
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() def test_len(): trie = marisa_trie.BinaryTrie() assert len(tr...
3
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_neq_different_type
assert
collection
18
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() def test_neq_different_type(): assert marisa_trie.BinaryTrie([b"...
{}
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_prefixes
assert
collection
22
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() def test_prefixes(): trie = marisa_trie.BinaryTrie([b"foo", b"f",...
[]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_get
assert
variable
22
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() @given(st.sets(text)) def test_get(keys): trie = marisa_trie.Bina...
key
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_init
assert
variable
25
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() @given(st.sets(text), text) def test_init(keys, missing_key): ass...
trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_get
assert
none_literal
27
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() @given(st.sets(text)) def test_get(keys): trie = marisa_trie.Bina...
None
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_saveload
assert
variable
29
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() @given(st.sets(text)) def test_saveload(tmpdir_factory, keys): tr...
trie2
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_binary_trie.py
test_eq_neq_different_order
assert
variable
21
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import Mapping text = st.binary() def test_eq_neq_different_order(): lo_trie = marisa_trie.BinaryTr...
wo_trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_items
assert
collection
25
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text def test_items(): data = [ ("fo", b"y"), ("foo", b"x"), ("foo", b"a"), ] ...
[]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_contains
assert
variable
24
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text @given(st.sets(text), st.lists(st.binary()), text) def test_contains(keys, values, missing_key): assum...
trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_getitem_multiple
assert
collection
21
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text def test_getitem_multiple(): data = [ ("foo", b"x"), ("fo", b"y"), ("foo", b"a...
[b"y"]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_getitem
assert
collection
22
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text @given(st.sets(text), st.lists(st.binary()), text) def test_getitem(keys, values, missing_key): assume...
[value]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_items
assert
func_call
21
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text def test_items(): data = [ ("fo", b"y"), ("foo", b"x"), ("foo", b"a"), ] ...
set(data)
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_getitem
pytest.raises
variable
24
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text @given(st.sets(text), st.lists(st.binary()), text) def test_getitem(keys, values, missing_key): assume...
KeyError)
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_getitem_multiple
assert
collection
22
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text def test_getitem_multiple(): data = [ ("foo", b"x"), ("fo", b"y"), ("foo", b"a...
[b"a", b"x"]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_keys
assert
collection
27
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text def test_keys(): trie = marisa_trie.BytesTrie( [ ("foo", b"x"), ("fo",...
["foo", "foo"]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_dumps_loads
assert
func_call
22
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text @given(st.sets(st.tuples(text, st.binary()))) def test_dumps_loads(data): trie = marisa_trie.BytesTrie...
pickle.load(buf)
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_keys
assert
collection
24
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text def test_keys(): trie = marisa_trie.BytesTrie( [ ("foo", b"x"), ("fo",...
["foo", "foo", "fo"]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_bytes_trie.py
test_iterkeys
assert
func_call
17
from __future__ import absolute_import, unicode_literals import io import pickle import pytest import hypothesis.strategies as st from hypothesis import assume, given import marisa_trie from .utils import text @given(st.sets(text), st.lists(st.binary())) def test_iterkeys(keys, values): trie = marisa_trie.Bytes...
list(trie.iterkeys())
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_record_trie.py
test_dumps_loads
assert
func_call
23
from __future__ import absolute_import import io import pickle import hypothesis.strategies as st from hypothesis import given import marisa_trie from .utils import text records = st.tuples(st.integers(min_value=0, max_value=2 ** 16 - 1), st.booleans()) @given(st.sets(st.tuples(text, records))) def test_dumps_load...
pickle.load(buf)
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_len
assert
numeric_literal
16
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping def test_len(): trie = marisa_trie.Trie() assert len(trie) ==
0
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_len
assert
numeric_literal
19
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping def test_len(): trie = marisa_trie.Trie() assert len(trie) == 0 trie = ...
3
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_neq_different_type
assert
collection
15
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping def test_neq_different_type(): assert marisa_trie.Trie(["foo", "bar"]) !=
{}
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_prefixes
assert
collection
19
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping def test_prefixes(): trie = marisa_trie.Trie(["foo", "f", "foobar", "bar"]) ...
[]
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_get
assert
variable
19
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping @given(st.sets(text)) def test_get(keys): trie = marisa_trie.Trie(keys) for ...
key
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_init
assert
variable
22
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping @given(st.sets(text), text) def test_init(keys, missing_key): assume(missing_key...
trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_get
assert
none_literal
27
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping @given(st.sets(text)) def test_get(keys): trie = marisa_trie.Trie(keys) for ...
None
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
pytries/marisa-trie
a4a0d80705d3115f1eafc935b842c90c406a0717
27
train
train
tests/test_trie.py
test_saveload
assert
variable
26
from __future__ import absolute_import, unicode_literals import pickle from uuid import uuid4 import pytest import hypothesis.strategies as st from hypothesis import given, assume import marisa_trie from .utils import text, Mapping @given(st.sets(text)) def test_saveload(tmpdir_factory, keys): trie = marisa_tri...
trie2
a4a0d80705d3115f1eafc935b842c90c406a0717
27
v2_extractor_at_anchor
qtile/qtile
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
train
train
test/layouts/layout_utils.py
assert_dimensions
assert
variable
12
def assert_focused(self, name): """Asserts that window with specified name is currently focused""" info = self.c.window.info() assert info["name"] == name, "Got {0!r}, expected {1!r}".format(info["name"], name) def assert_dimensions(self, x, y, w, h, win=None): """Asserts dimensions of window""" if...
x
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
v2_extractor_at_anchor
qtile/qtile
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
train
train
test/layouts/layout_utils.py
assert_dimensions
assert
variable
13
def assert_focused(self, name): """Asserts that window with specified name is currently focused""" info = self.c.window.info() assert info["name"] == name, "Got {0!r}, expected {1!r}".format(info["name"], name) def assert_dimensions(self, x, y, w, h, win=None): """Asserts dimensions of window""" if...
y
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
v2_extractor_at_anchor
qtile/qtile
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
train
train
test/layouts/layout_utils.py
assert_dimensions
assert
variable
14
def assert_focused(self, name): """Asserts that window with specified name is currently focused""" info = self.c.window.info() assert info["name"] == name, "Got {0!r}, expected {1!r}".format(info["name"], name) def assert_dimensions(self, x, y, w, h, win=None): """Asserts dimensions of window""" if...
w
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
v2_extractor_at_anchor
qtile/qtile
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
train
train
test/layouts/layout_utils.py
assert_dimensions
assert
variable
15
def assert_focused(self, name): """Asserts that window with specified name is currently focused""" info = self.c.window.info() assert info["name"] == name, "Got {0!r}, expected {1!r}".format(info["name"], name) def assert_dimensions(self, x, y, w, h, win=None): """Asserts dimensions of window""" if...
h
03d29fa2a1b3d1b9d81833e71b9c6f40335c1c31
750
v2_extractor_at_anchor