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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
amosjyng/langchain-visualizer | e954d9f36b8cf15ed2a49e06f25fa4df4f76e251 | 31 | train | train | tests/test_cli_args.py | test_start_with_args | assert | func_call | 11 | import subprocess
def test_start_with_args():
result = subprocess.run(
"python3 tests/dummy_viz.py asdf",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
assert "error: unrecognized arguments" not in | result.stderr.decode() | e954d9f36b8cf15ed2a49e06f25fa4df4f76e251 | 31 | v2_extractor_at_anchor |
amosjyng/langchain-visualizer | e954d9f36b8cf15ed2a49e06f25fa4df4f76e251 | 31 | train | train | tests/test_cli_args.py | test_start_with_args | assert | func_call | 12 | import subprocess
def test_start_with_args():
result = subprocess.run(
"python3 tests/dummy_viz.py asdf",
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
assert "error: unrecognized arguments" not in result.stderr.decode()
assert "Opening trace in browser"... | result.stdout.decode() | e954d9f36b8cf15ed2a49e06f25fa4df4f76e251 | 31 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_build_basic_image_with_env_vars | assert | variable | 28 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | e | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_two_runs | assert | numeric_literal | 27 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | 0 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_tback_in_callback | assert | numeric_literal | 49 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | 2 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_tback_in_callback | assert | variable | 48 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | im | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_output | assert | variable | 21 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | out | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_build_basic_image_with_labels | assert | string_literal | 25 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | "B" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_build_basic_image_with_labels | assert | string_literal | 26 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | "y" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_build_basic_image_with_all_params | assert | variable | 52 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | cmd_e | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_buildah_err_output | assert | complex_expr | 22 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | c.err | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_tback_in_callback | assert | string_literal | 47 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | "failed" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_build_basic_image_with_all_params | assert | complex_expr | 50 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | co["Env"] | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_buildah.py | test_build_basic_image | assert | variable | 31 | import json
import logging
import os
import re
import subprocess
from pathlib import Path
import pytest
from ansible_bender.builders.buildah_builder import buildah, inspect_resource, \
podman_run_cmd
from ..spellbook import basic_playbook_path, base_image, bad_playbook_path, random_word, basic_playbook_path_w_bv
... | top_layer_id | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_cli.py | test_inspect_cmd | assert | variable | 31 | from .test_buildah import ab
from ..spellbook import basic_playbook_path, base_image
def test_inspect_cmd(tmpdir, target_image):
workdir_path = "/etc"
l_a_b = "A=B"
l_x_y = "x=y"
e_a_b = "A=B"
e_x_y = "X=Y"
cmd, cmd_e = "ls -lha", ["ls", "-lha"]
entrypoint = "ls -lha"
# FIXME
# user... | out | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic_build_errr | assert | variable | 20 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic_build_errr(tmp... | e | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic | assert | numeric_literal | 27 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic(tmpdir):
c... | 3 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic | assert | string_literal | 24 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic(tmpdir):
c... | "1" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic | assert | bool_literal | 31 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic(tmpdir):
c... | False | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic | assert | string_literal | 47 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic(tmpdir):
c... | "/src" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic | assert | string_literal | 26 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic(tmpdir):
c... | "buildah" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_with_vars_files | assert | collection | 27 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_with_vars_files(tmpd... | {"x": "y"} | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/functional/test_conf.py | test_basic_build_errr | pytest.raises | complex_expr | 17 | import json
import logging
import subprocess
import pytest
from ansible_bender.builders.buildah_builder import buildah
from tests.spellbook import b_p_w_vars_path, p_w_vars_files_path, data_dir, basic_playbook_path
from ..conftest import ab
logger = logging.getLogger("ansible_bender")
def test_basic_build_errr(tmp... | subprocess.CalledProcessError) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_caching | assert | numeric_literal | 29 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | 5 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_caching_mechanism | assert | numeric_literal | 25 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | 2 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_no_cache_tag | assert | numeric_literal | 24 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | 4 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_stop_layering | assert | numeric_literal | 22 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | 3 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_pb_with_role | assert | numeric_literal | 28 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | 8 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_build_db_metadata | assert | none_literal | 20 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | None | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_build_db_metadata | assert | variable | 26 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | logs | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_file_caching_mechanism | assert | variable | 65 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | fun_content | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_api.py | test_caching | assert | collection | 26 | import os
import shutil
import subprocess
import yaml
from flexmock import flexmock
from ansible_bender.api import Application
from ansible_bender.builders.buildah_builder import podman_run_cmd
from ansible_bender.conf import Build
from ansible_bender.utils import random_str, run_cmd
from tests.spellbook import (dont... | [y.layer_id for y in build.layers[:3]] | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_buildah.py | test_get_version_rhel_8 | assert | collection | 26 | import pytest
from flexmock import flexmock
from ansible_bender.builders import buildah_builder
from ansible_bender.builders.buildah_builder import BuildahBuilder
from ansible_bender.conf import Build
BUILDAH_15_VERSION = """ \
Version: 1.5
Go Version: go1.11.5
Image Spec: 1.0.0
Runtime Spec: 1.0... | (1, 7, 3) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_validation_err_ux | assert | variable | 25 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | s | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_b_m_empty | assert | bool_literal | 29 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | True | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_set_all_params | assert | collection | 35 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | ["/a"] | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_multiplay | assert | string_literal | 20 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | "nope" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_expand_pb_vars | assert | string_literal | 22 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | "challet" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_set_all_params | assert | collection | 31 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | ["/c:/d"] | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_expand_pb_vars | assert | collection | 23 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | {"x": "y"} | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_set_all_params | assert | string_literal | 41 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | "leonardo" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_set_all_params | assert | string_literal | 27 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | "mona_lisa" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_expand_pb_vars | assert | collection | 24 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | {"asd": playbook_dir} | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_multiplay | assert | complex_expr | 21 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | caplog.records[0].msg | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_multiplay | assert | complex_expr | 22 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | caplog.records[1].msg | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_expand_pb_vars | assert | collection | 21 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | [f"{playbook_dir}:/src:Z"] | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_expand_pb_vars | assert | string_literal | 18 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | "docker.io/library/python:3-alpine" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_conf.py | test_validation_err_ux | pytest.raises | complex_expr | 20 | import json
import os
from pathlib import Path
import jsonschema
import pytest
from ansible_bender.conf import ImageMetadata, Build
from ansible_bender.core import PbVarsParser
from ansible_bender.db import Database
from ansible_bender.utils import set_logging
from tests.spellbook import b_p_w_vars_path, basic_playbo... | jsonschema.exceptions.ValidationError) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/integration/test_core.py | test_ansibles_python | pytest.raises | variable | 11 | import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.core import run_playbook
from tests.spellbook import C7_AP_VER_OUT
def test_ansibles_python():
flexmock(utils, run_cmd=lambda *args, **kwargs: C7_AP_VER_OUT),
with pytest.raises( | RuntimeError) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_ansibla.py | test_ansible_selinux_workaround | assert | func_call | 61 | import importlib
from functools import partial
from pathlib import Path
import pytest
from flexmock import flexmock
from ansible_bender.core import PbVarsParser
def mock_read_text(return_val=None, raise_exc=False):
if raise_exc:
def _f():
raise FileNotFoundError()
flexmock(Path, read_... | str(ex.value) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_ansibla.py | test_ansible_selinux_workaround | pytest.raises | variable | 59 | import importlib
from functools import partial
from pathlib import Path
import pytest
from flexmock import flexmock
from ansible_bender.core import PbVarsParser
def mock_read_text(return_val=None, raise_exc=False):
if raise_exc:
def _f():
raise FileNotFoundError()
flexmock(Path, read_... | RuntimeError) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_buildah.py | test_buildah_id | assert | string_literal | 17 | import json
from ansible_bender.builders import buildah_builder
from ansible_bender.builders.buildah_builder import get_buildah_image_id
from flexmock import flexmock
from tests.spellbook import buildah_inspect_data_path
def mock_inspect():
with open(buildah_inspect_data_path) as fd:
buildah_inspect_data... | "6aed6d59a707a7040ad25063eafd3a2165961a2c9f4d1d06ed0a73bdf2a89322" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_cli.py | test_split_once | pytest.raises | complex_expr | 8 | import pytest
from ansible_bender.cli import split_once_or_fail_with
def test_split_once():
secret = "banana"
with pytest.raises( | RuntimeError, match=secret) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_cli.py | test_split_once | assert | func_call | 10 | import pytest
from ansible_bender.cli import split_once_or_fail_with
def test_split_once():
secret = "banana"
with pytest.raises(RuntimeError, match=secret):
split_once_or_fail_with("a-a-a", "=", secret)
assert ("a", "a") == | split_once_or_fail_with("a=a", "=", secret) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_graceful_g_w_default | assert | numeric_literal | 18 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | 3 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_graceful_g | assert | variable | 23 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | exp | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_graceful_g_w_default | assert | string_literal | 16 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | "asd" | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_graceful_g_w_default | assert | collection | 17 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | {2: 3} | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_ansibles_python | assert | variable | 28 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | is_py2 | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_fancy_time | assert | variable | 16 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | expected | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
ansible-community/ansible-bender | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | train | train | tests/unit/test_utils.py | test_run_cmd | assert | func_call | 15 | import re
import pytest
from flexmock import flexmock
from ansible_bender import utils
from ansible_bender.db import generate_working_cont_name
from ansible_bender.utils import run_cmd, graceful_get, ap_command_exists, is_ansibles_python_2, fancy_time
from tests.spellbook import C7_AP_VER_OUT
from datetime import ti... | run_cmd(["ls", "-1", "/"], return_all_output=True) | 308ed404e26b5a6e5b2da0539f54e3b1bc7b4e39 | 72 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/messages/test_batches.py | test_method_results | assert | numeric_literal | 53 | from __future__ import annotations
import os
import json
from typing import Any, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.pagination import SyncPage, AsyncPage
from anthropic.types.beta.mess... | 1 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/messages/test_batches.py | test_raw_response_create | assert | bool_literal | 45 | from __future__ import annotations
import os
import json
from typing import Any, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.pagination import SyncPage, AsyncPage
from anthropic.types.beta.mess... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/test_files.py | test_raw_response_list | assert | bool_literal | 31 | from __future__ import annotations
import os
from typing import Any, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic._response import (
BinaryAPIResponse,
AsyncBinaryAPIResponse,
Stream... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/test_messages.py | test_raw_response_create_overload_1 | assert | bool_literal | 34 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types.beta import (
BetaMessage,
BetaMessageTokensCount,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http:/... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/test_messages.py | test_raw_response_create_overload_1 | assert | string_literal | 35 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types.beta import (
BetaMessage,
BetaMessageTokensCount,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http:/... | "python" | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/test_messages.py | test_raw_response_create_overload_1 | assert_* | variable | 37 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types.beta import (
BetaMessage,
BetaMessageTokensCount,
)
base_url = os.environ.get("TEST_API_BASE_URL", "http:/... | message) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/test_models.py | test_raw_response_retrieve | assert | bool_literal | 25 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.pagination import SyncPage, AsyncPage
from anthropic.types.beta import BetaModelInfo
base_url = os.environ.get("TEST_API_... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/beta/test_models.py | test_raw_response_retrieve | assert_* | variable | 28 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.pagination import SyncPage, AsyncPage
from anthropic.types.beta import BetaModelInfo
base_url = os.environ.get("TEST_API_... | model) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/messages/test_batches.py | test_method_results | assert | numeric_literal | 52 | from __future__ import annotations
import os
import json
from typing import Any, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.pagination import SyncPage, AsyncPage
from anthropic.types.messages ... | 1 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/messages/test_batches.py | test_raw_response_create | assert | bool_literal | 45 | from __future__ import annotations
import os
import json
from typing import Any, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.pagination import SyncPage, AsyncPage
from anthropic.types.messages ... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_completions.py | test_raw_response_create_overload_1 | assert | bool_literal | 26 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import Completion
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
class TestCompletions:
... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_completions.py | test_raw_response_create_overload_1 | assert | string_literal | 27 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import Completion
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
class TestCompletions:
... | "python" | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_completions.py | test_raw_response_create_overload_1 | assert_* | variable | 29 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import Completion
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
class TestCompletions:
... | completion) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_messages.py | test_raw_response_create_overload_1 | assert | bool_literal | 35 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import (
Message,
MessageTokensCount,
)
from anthropic.resources.messages import DEPRECATED_MODELS
base_url... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_messages.py | test_raw_response_create_overload_1 | assert | string_literal | 36 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import (
Message,
MessageTokensCount,
)
from anthropic.resources.messages import DEPRECATED_MODELS
base_url... | "python" | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_messages.py | test_raw_response_create_overload_1 | assert_* | variable | 38 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import (
Message,
MessageTokensCount,
)
from anthropic.resources.messages import DEPRECATED_MODELS
base_url... | message) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_models.py | test_raw_response_retrieve | assert | bool_literal | 25 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import ModelInfo
from anthropic.pagination import SyncPage, AsyncPage
base_url = os.environ.get("TEST_API_BASE_URL"... | True | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/api_resources/test_models.py | test_raw_response_retrieve | assert_* | variable | 28 | from __future__ import annotations
import os
from typing import Any, cast
import pytest
from anthropic import Anthropic, AsyncAnthropic
from tests.utils import assert_matches_type
from anthropic.types import ModelInfo
from anthropic.pagination import SyncPage, AsyncPage
base_url = os.environ.get("TEST_API_BASE_URL"... | model) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/decoders/test_jsonl.py | test_basic | assert_* | variable | 30 | from __future__ import annotations
from typing import Any, Iterator, AsyncIterator
from typing_extensions import TypeVar
import httpx
import pytest
from anthropic._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
_T = TypeVar("_T")
@pytest.mark.asyncio
@pytest.mark.parametrize("sync", [True, False], ids=["syn... | iterator) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/decoders/test_jsonl.py | test_basic | assert | collection | 27 | from __future__ import annotations
from typing import Any, Iterator, AsyncIterator
from typing_extensions import TypeVar
import httpx
import pytest
from anthropic._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
_T = TypeVar("_T")
@pytest.mark.asyncio
@pytest.mark.parametrize("sync", [True, False], ids=["syn... | {"foo": True} | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/decoders/test_jsonl.py | test_basic | assert | collection | 28 | from __future__ import annotations
from typing import Any, Iterator, AsyncIterator
from typing_extensions import TypeVar
import httpx
import pytest
from anthropic._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
_T = TypeVar("_T")
@pytest.mark.asyncio
@pytest.mark.parametrize("sync", [True, False], ids=["syn... | {"bar": False} | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/decoders/test_jsonl.py | test_multi_byte_character_multiple_chunks | assert | collection | 29 | from __future__ import annotations
from typing import Any, Iterator, AsyncIterator
from typing_extensions import TypeVar
import httpx
import pytest
from anthropic._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
_T = TypeVar("_T")
@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])
async d... | {"content": "известни"} | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/decoders/test_jsonl.py | assert_empty_iter | pytest.raises | collection | 24 | from __future__ import annotations
from typing import Any, Iterator, AsyncIterator
from typing_extensions import TypeVar
import httpx
import pytest
from anthropic._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
_T = TypeVar("_T")
async def to_aiter(iter: Iterator[bytes]) -> AsyncIterator[bytes]:
for chu... | (StopAsyncIteration, RuntimeError)) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/decoders/test_jsonl.py | test_new_lines_in_json | assert | collection | 23 | from __future__ import annotations
from typing import Any, Iterator, AsyncIterator
from typing_extensions import TypeVar
import httpx
import pytest
from anthropic._decoders.jsonl import JSONLDecoder, AsyncJSONLDecoder
_T = TypeVar("_T")
@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"])
async d... | {"content": "Hello, world!\nHow are you doing?"} | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | test_tracks_tool_input_type_alias_is_up_to_date | assert | variable | 212 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | tracked_types | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | assert_basic_response | assert_* | variable | 172 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | EXPECTED_BASIC_MESSAGE) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | assert_basic_response | assert | variable | 173 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | EXPECTED_BASIC_EVENT_TYPES | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | assert_tool_use_response | assert_* | variable | 176 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | EXPECTED_TOOL_USE_MESSAGE) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | test_basic_response | assert_* | func_call | 202 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | stream.get_final_message()) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | assert_incomplete_partial_input_response | assert_* | variable | 180 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | EXPECTED_INCOMPLETE_MESSAGE) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | assert_tool_use_response | assert | variable | 177 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | EXPECTED_TOOL_USE_EVENT_TYPES | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | assert_incomplete_partial_input_response | assert | variable | 181 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | EXPECTED_INCOMPLETE_EVENT_TYPES | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_beta_messages.py | test_basic_response | assert_* | func_call | 203 | from __future__ import annotations
import os
import json
import inspect
from typing import Any, Set, Dict, TypeVar, cast
from unittest import TestCase
import httpx
import pytest
from respx import MockRouter
from anthropic import Anthropic, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.types... | await stream.get_final_message()) | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_messages.py | assert_basic_response | assert | numeric_literal | 36 | from __future__ import annotations
import os
import inspect
from typing import Any, Set, TypeVar, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Stream, Anthropic, AsyncStream, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.lib.streaming import MessageStre... | 1 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_messages.py | assert_tool_use_response | assert | numeric_literal | 62 | from __future__ import annotations
import os
import inspect
from typing import Any, Set, TypeVar, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Stream, Anthropic, AsyncStream, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.lib.streaming import MessageStre... | 2 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_messages.py | assert_tool_use_response | assert | numeric_literal | 78 | from __future__ import annotations
import os
import inspect
from typing import Any, Set, TypeVar, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Stream, Anthropic, AsyncStream, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.lib.streaming import MessageStre... | 0 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_messages.py | assert_tool_use_response | assert | numeric_literal | 77 | from __future__ import annotations
import os
import inspect
from typing import Any, Set, TypeVar, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Stream, Anthropic, AsyncStream, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.lib.streaming import MessageStre... | 65 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_messages.py | assert_tool_use_response | assert | numeric_literal | 76 | from __future__ import annotations
import os
import inspect
from typing import Any, Set, TypeVar, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Stream, Anthropic, AsyncStream, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.lib.streaming import MessageStre... | 377 | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
anthropics/anthropic-sdk-python | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | train | train | tests/lib/streaming/test_messages.py | assert_basic_response | assert | none_literal | 34 | from __future__ import annotations
import os
import inspect
from typing import Any, Set, TypeVar, cast
import httpx
import pytest
from respx import MockRouter
from anthropic import Stream, Anthropic, AsyncStream, AsyncAnthropic
from anthropic._compat import PYDANTIC_V2
from anthropic.lib.streaming import MessageStre... | None | 46e4b98bac8f3f4ae419aa6e9054a30436bad5d1 | 159 | v2_extractor_at_anchor |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.