repo_id
stringclasses
409 values
prefix
large_stringlengths
34
36.3k
target
large_stringlengths
1
498
assertion_type
stringclasses
31 values
difficulty
stringclasses
8 values
test_file
stringlengths
10
121
test_function
stringlengths
1
104
test_class
stringlengths
0
51
lineno
int32
2
11.3k
commit_idx
int32
steamship-core/python-client
import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_index, random_name from steamship import SteamshipError, Tag from steamship.data.embeddings import EmbeddedItem _TEST_EMBEDDER = "test-embedder" def test_reset_index(): steamship = get_st...
1
assert
numeric_literal
tests/steamship_tests/client/operations/test_embedding_index.py
test_reset_index
100
null
steamship-core/python-client
import base64 import json import re import pytest import requests from assets.packages.demo_package import TestPackage from requests import ConnectTimeout from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import ...
True
assert
bool_literal
tests/steamship_tests/app/integration/test_package_instance.py
test_instance_invoke
156
null
steamship-core/python-client
from typing import List import pytest from pydantic import BaseModel from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError, Task, TaskState def schedule_task(client, please_fail: bool = False, dependencies: List[Task] = None) -> Task: response = client.post( ...
task1.task_id
assert
complex_expr
tests/steamship_tests/client/test_task_dependencies.py
on_task_check
39
null
steamship-core/python-client
from pathlib import Path from typing import Type, Union import pytest from steamship.base.client import Client from steamship.invocable import Config, InvocableResponse from steamship.invocable.plugin_service import PluginRequest, PluginService from steamship.plugin.inputs.train_plugin_input import TrainPluginInput f...
TypeError)
pytest.raises
variable
tests/steamship_tests/plugin/unit/test_service.py
test_plugin_service_is_abstract
78
null
steamship-core/python-client
import pytest from assets.packages.package_with_mixins import PackageWithMixin, TestMixin from steamship import SteamshipError from steamship.invocable import ( Invocable, InvocableRequest, InvocableResponse, Invocation, PackageService, post, ) from steamship.utils.url import Verb def invoke(o...
1
assert
numeric_literal
tests/steamship_tests/app/unit/test_mixins.py
test_package_with_mixin_routes
28
null
steamship-core/python-client
import pytest from steamship import Block, File, Steamship from steamship.agents.react import ReACTOutputParser @pytest.mark.usefixtures("client") def test_parse_output(client: Steamship): file = File.create(client, blocks=[Block(text="test"), Block(text="Another test")]) block_id = file.blocks[0].id blo...
5
assert
numeric_literal
tests/steamship_tests/agents/test_react_parse_output.py
test_parse_output
24
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.client import steamship_use from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Steamshi...
package.handle
assert
complex_expr
tests/steamship_tests/app/integration/test_use_package.py
test_use_package_fails_with_same_instance_name_but_different_config_unless_anon
194
null
steamship-core/python-client
import json import pytest from steamship import Block, Steamship, Tag from steamship.agents.functional import FunctionsBasedAgent from steamship.agents.llms.openai import ChatOpenAI from steamship.agents.schema import Action, AgentContext, FinishAction from steamship.agents.schema.message_selectors import MessageWind...
msg_text
assert
variable
tests/steamship_tests/agents/test_functions_based_agent.py
test_functions_based_agent_build_chat_history
27
null
steamship-core/python-client
import json from typing import List import pytest from steamship_tests import TEST_ASSETS_PATH from steamship_tests.utils.deployables import zip_deployable from steamship import Package, PackageInstance, PackageVersion, Steamship, SteamshipError from steamship.data.package.package_version import CreatePackageVersionR...
"PIL"
assert
string_literal
tests/steamship_tests/app/integration/test_requirements_installation_isolation.py
test_install_two_packages_at_once
33
null
steamship-core/python-client
import pytest import requests from steamship import Block, Steamship from steamship.agents.llms import OpenAI from steamship.agents.schema import AgentContext from steamship.agents.tools.image_generation import DalleTool from steamship.agents.utils import with_llm @pytest.mark.usefixtures("client") def test_dalle_too...
True
assert
bool_literal
tests/steamship_tests/agents/tools/test_dalle_tool.py
test_dalle_tool
21
null
steamship-core/python-client
from steamship_tests.utils.fixtures import get_steamship_client from steamship import File from steamship.base import TaskState def test_file_upload_then_parse(): steamship = get_steamship_client() a = File.create( steamship, content="This is a test.", ) assert a.id is not None q...
0
assert
numeric_literal
tests/steamship_tests/client/operations/test_blockify.py
test_file_upload_then_parse
17
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship import Steamship @pytest.mark.usefixtures("client") def test_mixin_and_package_invocation(client: Steamship): demo_package_path = PACKAGES_PATH / "package_with_mixins.py" with d...
"package"
assert
string_literal
tests/steamship_tests/app/integration/test_e2e_mixins.py
test_mixin_and_package_invocation
17
null
steamship-core/python-client
import pytest import requests from steamship import Block, Steamship from steamship.agents.llms import OpenAI from steamship.agents.schema import AgentContext from steamship.agents.tools.image_generation import DalleTool from steamship.agents.utils import with_llm @pytest.mark.usefixtures("client") def test_dalle_too...
None
assert
none_literal
tests/steamship_tests/agents/tools/test_dalle_tool.py
test_dalle_tool
27
null
steamship-core/python-client
import json import logging import time from typing import Any, List, Optional, Union import pytest import requests import sseclient from pydantic.fields import PrivateAttr from steamship_tests import SRC_PATH from steamship_tests.utils.deployables import deploy_package from steamship import Block, File, Steamship, St...
5
assert
numeric_literal
tests/steamship_tests/agents/test_agent_service.py
test_example_with_caching_service
46
null
steamship-core/python-client
import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_index, random_name from steamship import SteamshipError, Tag from steamship.data.embeddings import EmbeddedItem _TEST_EMBEDDER = "test-embedder" def test_reset_index(): steamship = get_st...
2
assert
numeric_literal
tests/steamship_tests/client/operations/test_embedding_index.py
test_reset_index
92
null
steamship-core/python-client
import pytest from steamship_tests import PLUGINS_PATH from steamship_tests.utils.client import steamship_use_plugin from steamship_tests.utils.deployables import deploy_plugin from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Ste...
"default"
assert
string_literal
tests/steamship_tests/plugin/integration/test_use_plugin.py
test_use_plugin
69
null
steamship-core/python-client
import base64 import json import re import pytest import requests from assets.packages.demo_package import TestPackage from requests import ConnectTimeout from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import ...
"default"
assert
string_literal
tests/steamship_tests/app/integration/test_package_instance.py
test_deploy_in_workspace
233
null
steamship-core/python-client
import pytest from steamship import Steamship from steamship.agents.examples.document_qa_agent import ExampleDocumentQAService from steamship.utils.url import Verb @pytest.mark.usefixtures("client") def test_indexer_pipeline_mixin(client: Steamship): package_class = ExampleDocumentQAService post_routes = pac...
post_routes
assert
variable
tests/steamship_tests/app/unit/test_document_qa_example.py
test_indexer_pipeline_mixin
13
null
steamship-core/python-client
__copyright__ = "Steamship" __license__ = "MIT" import json from enum import Enum from steamship.agents.schema.functions import FunctionParameters, FunctionProperty, JSONType from steamship.base.model import CamelModel def test_enum_serialization_behavior(): assert json.dumps(TrainingPlatform.ECS) == '"ecs"' ...
"lambda"
assert
string_literal
tests/steamship_tests/utils/test_enums.py
test_enum_serialization_behavior
31
null
steamship-core/python-client
import uuid import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import PluginInstance, SteamshipError, Workspace from steamship.data.plugin import Plugin, PluginAdapterType, PluginType from steamship.data.user import User def test_plugin_create(): steamship = get_steamshi...
TypeError)
pytest.raises
variable
tests/steamship_tests/data/test_plugins.py
test_plugin_create
29
null
steamship-core/python-client
import uuid import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError, Workspace from steamship.base.request import SortOrder def test_get_workspace(): client = get_steamship_client() default = Workspace.get(client=client) workspace1 = Workspace.cr...
workspace1.id
assert
complex_expr
tests/steamship_tests/data/test_workspace.py
test_get_workspace
47
null
steamship-core/python-client
import pytest from steamship import Block, Steamship from steamship.agents.llms import OpenAI from steamship.agents.llms.openai import ChatOpenAI @pytest.mark.usefixtures("client") def test_openai_llm(client: Steamship): llm = OpenAI(client=client, temperature=0) blocks = llm.complete(prompt="Why did the chic...
1
assert
numeric_literal
tests/steamship_tests/agents/test_openai.py
test_openai_llm
13
null
steamship-core/python-client
import pytest from steamship_tests import PLUGINS_PATH from steamship_tests.utils.client import steamship_use_skill from steamship_tests.utils.deployables import deploy_plugin from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError from steamship.client.steamship import SKI...
test_str
assert
variable
tests/steamship_tests/plugin/integration/test_use_skill.py
_test_skill_instance
73
null
steamship-core/python-client
import pytest from steamship import Steamship from steamship.invocable.mixins.indexer_mixin import IndexerMixin @pytest.mark.usefixtures("client") def test_indexer_mixin_and_qa_tool(client: Steamship): """Tests that we can inspect the package and mixin routes""" indexer = IndexerMixin(client) assert index...
{}
assert
collection
tests/steamship_tests/app/unit/test_indexer_mixin.py
test_indexer_mixin_and_qa_tool
17
null
steamship-core/python-client
import json import pytest from steamship.client import Steamship from steamship.data.block import Block from steamship.data.file import File from steamship.data.tags.tag import Tag @pytest.mark.usefixtures("client") def test_serialize_client_to_json_works(client: Steamship): assert "use" not in
client.dict().keys()
assert
func_call
tests/steamship_tests/base/test_serialization.py
test_serialize_client_to_json_works
25
null
steamship-core/python-client
import uuid import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import PluginInstance, SteamshipError, Workspace from steamship.data.plugin import Plugin, PluginAdapterType, PluginType from steamship.data.user import User def test_plugin_instance_quick_create(): steamship...
p4.id
assert
complex_expr
tests/steamship_tests/data/test_plugins.py
test_plugin_instance_quick_create
145
null
steamship-core/python-client
from enum import Enum import pytest from steamship_tests.utils.client import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Steamship, Workspace from steamship.utils.kv_store import KeyValueStore @pytest.mark.usefixtures("client") def test_key_value_store(client: Stea...
res
assert
variable
tests/steamship_tests/utils/test_kv_store.py
test_key_value_store
51
null
steamship-core/python-client
from typing import List import pytest from pydantic import BaseModel from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError, Task, TaskState def schedule_task(client, please_fail: bool = False, dependencies: List[Task] = None) -> Task: response = client.post( ...
e.message
assert
complex_expr
tests/steamship_tests/client/test_task_dependencies.py
test_task_dependencies_parallel_failure
76
null
steamship-core/python-client
__copyright__ = "Steamship" __license__ = "MIT" import json from enum import Enum from steamship.agents.schema.functions import FunctionParameters, FunctionProperty, JSONType from steamship.base.model import CamelModel def test_enum_serialization_behavior(): assert json.dumps(TrainingPlatform.ECS) ==
'"ecs"'
assert
string_literal
tests/steamship_tests/utils/test_enums.py
test_enum_serialization_behavior
23
null
steamship-core/python-client
import contextlib import io import os import zipfile from pathlib import Path from typing import Any, Dict, List, Optional from steamship_tests import ROOT_PATH, SRC_PATH, TEST_ASSETS_PATH from steamship import Package, PackageInstance, PackageVersion, Steamship from steamship.data.invocable_init_status import Invoca...
plugin.id
assert
complex_expr
tests/steamship_tests/utils/deployables.py
deploy_plugin
100
null
steamship-core/python-client
import base64 import json import re import pytest import requests from assets.packages.demo_package import TestPackage from requests import ConnectTimeout from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import ...
workspace.id
assert
complex_expr
tests/steamship_tests/app/integration/test_package_instance.py
test_deploy_in_workspace
237
null
steamship-core/python-client
from __future__ import annotations import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError from steamship.base.model import CamelModel from steamship.base.tasks import TaskState def test_background_task_call(): client = get_steamship_client() # The ...
NoOpResult
assert
variable
tests/steamship_tests/base/test_task.py
test_background_task_call
24
null
steamship-core/python-client
import pytest from steamship import Steamship from steamship.invocable.mixins.indexer_mixin import IndexerMixin @pytest.mark.usefixtures("client") def test_indexer_mixin_and_qa_tool(client: Steamship): """Tests that we can inspect the package and mixin routes""" indexer = IndexerMixin(client) assert index...
1
assert
numeric_literal
tests/steamship_tests/app/unit/test_indexer_mixin.py
test_indexer_mixin_and_qa_tool
14
null
steamship-core/python-client
import pytest from steamship import File, Steamship from steamship.invocable import PackageService from steamship.invocable.mixins.indexer_pipeline_mixin import IndexerPipelineMixin @pytest.mark.usefixtures("client") def test_set_file_status(client: Steamship): """Tests that we can inspect the package and mixin r...
"FOO"
assert
string_literal
tests/steamship_tests/app/unit/test_indexer_pipeline_mixin.py
test_set_file_status
20
null
steamship-core/python-client
from typing import List import pytest from pydantic import BaseModel from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError, Task, TaskState def schedule_task(client, please_fail: bool = False, dependencies: List[Task] = None) -> Task: response = client.post( ...
None
assert
none_literal
tests/steamship_tests/client/test_task_dependencies.py
schedule_task
18
null
steamship-core/python-client
import pytest from steamship import Block, Steamship from steamship.agents.llms import OpenAI from steamship.agents.schema import AgentContext from steamship.agents.tools.classification.multiple_choice_tool import MultipleChoiceTool from steamship.agents.utils import with_llm TESTS = [ ("Pencil", "Other"), ("...
gold
assert
variable
tests/steamship_tests/agents/tools/test_multiple_choice_tool.py
test_multiple_choice_tool
28
null
steamship-core/python-client
import base64 import json import re import pytest import requests from assets.packages.demo_package import TestPackage from requests import ConnectTimeout from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import ...
1
assert
numeric_literal
tests/steamship_tests/app/integration/test_package_instance.py
test_list
311
null
steamship-core/python-client
from __future__ import annotations import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError from steamship.base.model import CamelModel from steamship.base.tasks import TaskState def test_task_update(): client = get_steamship_client() # We'll backgro...
status
assert
variable
tests/steamship_tests/base/test_task.py
test_task_update
108
null
steamship-core/python-client
__copyright__ = "Steamship" __license__ = "MIT" from typing import Any, Callable, Optional from pydantic import BaseModel, Extra from steamship.base.model import CamelModel def test_static_instance_methods(): assert Foo.name() ==
"static"
assert
string_literal
tests/steamship_tests/utils/test_static_instance_methods.py
test_static_instance_methods
56
null
steamship-core/python-client
from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_index from steamship import DocTag, File, MimeTypes, PluginInstance, Tag _TEST_EMBEDDER = "test-embedder" T = "A nice poem" P1_1 = "Roses are red." P1_2 = "Violets are blue." P2_1 = "Sugar is sweet." P2_2 ...
MimeTypes.MKD
assert
complex_expr
tests/steamship_tests/client/operations/test_embed_file.py
test_file_index
87
null
steamship-core/python-client
import time import pytest from steamship_tests import PLUGINS_PATH from steamship_tests.utils.deployables import deploy_plugin from steamship import Block, Steamship from steamship.data.block import StreamState @pytest.mark.usefixtures("client") def test_e2e_generator(client: Steamship): parser_path = PLUGINS_PA...
""
assert
string_literal
tests/steamship_tests/plugin/integration/test_e2e_streaming_generator.py
test_e2e_generator
34
null
steamship-core/python-client
import pytest from steamship_tests.utils.client import TESTING_PROFILE from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Steamship, SteamshipError, Workspace from steamship.data.user import User def test_connect(): """Test ba...
None
assert
none_literal
tests/steamship_tests/client/test_client.py
test_connect
13
null
steamship-core/python-client
from typing import Callable, Optional import pytest from assets.packages.configurable_hello_world import HelloWorld from assets.packages.demo_package import TestPackage from assets.packages.fancy_types import FancyTypes from assets.packages.optional_params import OptionalParams @pytest.mark.parametrize("invocable_han...
4
assert
numeric_literal
tests/steamship_tests/app/unit/test_demo_app_spec.py
test_package_spec_optional_params
80
null
steamship-core/python-client
import pytest from steamship import File, Steamship from steamship.invocable import PackageService from steamship.invocable.mixins.indexer_pipeline_mixin import IndexerPipelineMixin @pytest.mark.usefixtures("client") def test_set_file_status(client: Steamship): """Tests that we can inspect the package and mixin r...
1
assert
numeric_literal
tests/steamship_tests/app/unit/test_indexer_pipeline_mixin.py
test_set_file_status
17
null
steamship-core/python-client
import pytest import requests from assets.packages.transports.mock_telegram_api import MockTelegramApi from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship import File, PackageInstance, Steamship from steamship.agents.mixins.transports.telegram import Te...
1
assert
numeric_literal
tests/steamship_tests/agents/transports/test_telegram.py
test_telegram
59
null
steamship-core/python-client
from typing import Any, Dict, Type import pytest from steamship import Steamship, SteamshipError from steamship.agents.llms import OpenAI from steamship.agents.mixins.transports.telegram import TelegramTransport, TelegramTransportConfig from steamship.agents.react import ReACTAgent from steamship.agents.schema import...
"bar"
assert
string_literal
tests/steamship_tests/app/unit/test_routes_on_superclasses.py
test_l1_routes
104
null
steamship-core/python-client
import os from pathlib import Path from typing import Callable from assets.plugins.taggers.plugin_trainable_tagger import ( TRAINING_PARAMETERS, TestTrainableTaggerModel, ) from steamship_tests.utils.fixtures import get_steamship_client from steamship.plugin.inputs.train_plugin_input import TrainPluginInput f...
f2.read()
assert
func_call
tests/steamship_tests/plugin/unit/trainable/test_model_checkpoints.py
_assert_same_content
38
null
steamship-core/python-client
import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_index, random_name from steamship import SteamshipError, Tag from steamship.data.embeddings import EmbeddedItem _TEST_EMBEDDER = "test-embedder" def test_reset_index(): steamship = get_st...
items_1
assert
variable
tests/steamship_tests/client/operations/test_embedding_index.py
test_reset_index
93
null
steamship-core/python-client
import os from pathlib import Path from typing import Callable from assets.plugins.taggers.plugin_trainable_tagger import ( TRAINING_PARAMETERS, TestTrainableTaggerModel, ) from steamship_tests.utils.fixtures import get_steamship_client from steamship.plugin.inputs.train_plugin_input import TrainPluginInput f...
p2_files
assert
variable
tests/steamship_tests/plugin/unit/trainable/test_model_checkpoints.py
_assert_same_content
33
null
steamship-core/python-client
import pytest from steamship import Block, File, Steamship from steamship.agents.react import ReACTOutputParser @pytest.mark.usefixtures("client") def test_parse_output(client: Steamship): file = File.create(client, blocks=[Block(text="test"), Block(text="Another test")]) block_id = file.blocks[0].id blo...
4
assert
numeric_literal
tests/steamship_tests/agents/test_react_parse_output.py
test_parse_output
33
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship import File, MimeTypes, Steamship, Task, TaskState from steamship.data.plugin.index_plugin_instance import SearchResults @pytest.mark.usefixtures("client") def test_imp...
2
assert
numeric_literal
tests/steamship_tests/app/integration/test_e2e_mixins_importer_blockifier.py
test_importer_mixin_and_package_invocation
52
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship import PackageInstance, Steamship @pytest.mark.usefixtures("client") def test_configurable_instance_invoke(client: Steamship): greeting1 = "Hola" config_template = { "gre...
instance2.id
assert
complex_expr
tests/steamship_tests/app/integration/test_configurable_package_instance.py
test_configurable_instance_invoke
69
null
steamship-core/python-client
from typing import Any, Callable, List, Optional, Union import pytest from steamship import Block, Task from steamship.agents.functional import FunctionsBasedAgent from steamship.agents.llms.openai import ChatOpenAI from steamship.agents.schema import AgentContext, Tool from steamship.agents.schema.message_selectors ...
"Peru"
assert
string_literal
tests/steamship_tests/agents/test_agent_with_final_tool.py
test_final_tool_assistant
74
null
steamship-core/python-client
from typing import Any from steamship.base.mime_types import MimeTypes from steamship.data.file import File from steamship.invocable import InvocableResponse from steamship.plugin.outputs.block_and_tag_plugin_output import BlockAndTagPluginOutput def check_mime(d: dict, mime: str): assert d.get("http", {}).get("h...
val
assert
variable
tests/steamship_tests/app/unit/test_response.py
check_val
20
null
steamship-core/python-client
from typing import Optional from assets.packages.configurable_hello_world import HelloWorld from pydantic import Field from steamship.invocable.config import Config, ConfigParameterType def test_descriptions(): class DescriptionConfig(Config): x: int = Field(description="Test Description") descripti...
1
assert
numeric_literal
tests/steamship_tests/app/unit/test_config_template_extraction.py
test_descriptions
149
null
steamship-core/python-client
import contextlib import io import os import zipfile from pathlib import Path from typing import Any, Dict, List, Optional from steamship_tests import ROOT_PATH, SRC_PATH, TEST_ASSETS_PATH from steamship import Package, PackageInstance, PackageVersion, Steamship from steamship.data.invocable_init_status import Invoca...
user.id
assert
complex_expr
tests/steamship_tests/utils/deployables.py
_check_user
165
null
steamship-core/python-client
from typing import Callable, Optional import pytest from assets.packages.configurable_hello_world import HelloWorld from assets.packages.demo_package import TestPackage from assets.packages.fancy_types import FancyTypes from assets.packages.optional_params import OptionalParams @pytest.mark.parametrize("invocable_han...
7
assert
numeric_literal
tests/steamship_tests/app/unit/test_demo_app_spec.py
test_package_spec_missing_configuration
70
null
steamship-core/python-client
from typing import Callable, Optional import pytest from assets.packages.configurable_hello_world import HelloWorld from assets.packages.demo_package import TestPackage from assets.packages.fancy_types import FancyTypes from assets.packages.optional_params import OptionalParams @pytest.mark.parametrize("invocable_han...
0
assert
numeric_literal
tests/steamship_tests/app/unit/test_demo_app_spec.py
test_package_spec_optional_params
88
null
steamship-core/python-client
from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import get_steamship_client def test_returns_list(): client = get_steamship_client() demo_package_path = PACKAGES_PATH / "returns_list.py" with deploy_package(client,...
None
assert
none_literal
tests/steamship_tests/app/integration/test_returns_list.py
test_returns_list
13
null
steamship-core/python-client
import base64 import json from steamship.base.model import CamelModel from steamship.plugin.outputs.raw_data_plugin_output import RawDataPluginOutput from steamship.utils.binary_utils import flexi_create def test_dump_string(): data, mime, encoding = flexi_create(string="Hi") assert data ==
"Hi"
assert
string_literal
tests/steamship_tests/base/test_binary_utils.py
test_dump_string
11
null
steamship-core/python-client
import base64 import json from steamship.base.model import CamelModel from steamship.plugin.outputs.raw_data_plugin_output import RawDataPluginOutput from steamship.utils.binary_utils import flexi_create def test_dump_json(): assert json.dumps(flexi_create(json="Hi")[0]) == '"Hi"' assert json.dumps(flexi_crea...
"1.2"
assert
string_literal
tests/steamship_tests/base/test_binary_utils.py
test_dump_json
17
null
steamship-core/python-client
import pytest from assets.packages.package_with_mixins import PackageWithMixin, TestMixin from steamship import SteamshipError from steamship.invocable import ( Invocable, InvocableRequest, InvocableResponse, Invocation, PackageService, post, ) from steamship.utils.url import Verb def invoke(o...
"mixin yo"
assert
string_literal
tests/steamship_tests/app/unit/test_mixins.py
test_mixins_declared_in_superclass
87
null
steamship-core/python-client
import pytest from steamship import DocTag, Steamship from steamship.agents.llms import OpenAI from steamship.agents.schema import AgentContext from steamship.agents.tools.question_answering import VectorSearchQATool from steamship.agents.utils import with_llm from steamship.data import TagKind from steamship.invocabl...
True
assert
bool_literal
tests/steamship_tests/agents/tools/test_vector_search_qa_tool.py
test_vector_search_qa_tool
41
null
steamship-core/python-client
import pytest from steamship import Block, File, Steamship from steamship.agents.functional import FunctionsBasedOutputParser from steamship.agents.schema import AgentContext, FinishAction @pytest.mark.usefixtures("client") def test_output_block_ids_are_converted(client: Steamship): context = AgentContext() c...
block_id
assert
variable
tests/steamship_tests/agents/test_function_agent_output_parser.py
test_output_block_ids_are_converted
20
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError def test_safe_loaded_package_with_bad_import(): client = get_steamship_client() demo_package...
None
assert
none_literal
tests/steamship_tests/app/integration/test_safe_loaded_package_with_bad_import.py
test_safe_loaded_package_with_bad_import
16
null
steamship-core/python-client
from steamship.utils.text_chunker import chunk_text def test_text_chunker(): chunked = list(chunk_text("Hi there")) assert len(chunked) == 1 chunked = list(chunk_text("12345", chunk_size=1, chunk_overlap=0)) assert len(chunked) == 5 assert chunked ==
["1", "2", "3", "4", "5"]
assert
collection
tests/steamship_tests/utils/test_text_chunker.py
test_text_chunker
10
null
steamship-core/python-client
from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import get_steamship_client def test_returns_list(): client = get_steamship_client() demo_package_path = PACKAGES_PATH / "returns_list.py" with deploy_package(client,...
["here's", "a", "list"]
assert
collection
tests/steamship_tests/app/integration/test_returns_list.py
test_returns_list
15
null
steamship-core/python-client
import time import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import get_steamship_client from steamship import File @pytest.mark.skip( reason="article tagging depends on a classifier plugin that needs to be re...
2
assert
numeric_literal
tests/steamship_tests/app/integration/test_article_tagging.py
test_article_tagging
56
null
steamship-core/python-client
from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import get_steamship_client from steamship.utils.url import Verb def test_example_project_structure(): client = get_steamship_client() demo_package_path = PACKAGES_PATH /...
None
assert
none_literal
tests/steamship_tests/app/integration/test_example_project_structure.py
test_example_project_structure
15
null
steamship-core/python-client
from typing import Optional from assets.packages.configurable_hello_world import HelloWorld from pydantic import Field from steamship.invocable.config import Config, ConfigParameterType def test_config_parameters(): config_template = HelloWorld.get_config_parameters() assert len(config_template) == 4 for...
names
assert
variable
tests/steamship_tests/app/unit/test_config_template_extraction.py
test_config_parameters
17
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship import File, MimeTypes, Steamship, Task, TaskState from steamship.data.plugin.index_plugin_instance import SearchResults @pytest.mark.usefixtures("client") def test_imp...
0
assert
numeric_literal
tests/steamship_tests/app/integration/test_e2e_mixins_importer_blockifier.py
test_importer_mixin_and_package_invocation
77
null
steamship-core/python-client
from __future__ import annotations import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError from steamship.base.model import CamelModel from steamship.base.tasks import TaskState def test_background_task_call(): client = get_steamship_client() # The ...
None
assert
none_literal
tests/steamship_tests/base/test_task.py
test_background_task_call
23
null
steamship-core/python-client
import pytest from steamship_tests.utils.client import TESTING_PROFILE from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Steamship, SteamshipError, Workspace from steamship.data.user import User def test_client_has_default_worksp...
"default"
assert
string_literal
tests/steamship_tests/client/test_client.py
test_client_has_default_workspace_unless_otherwise_specified
66
null
steamship-core/python-client
import base64 import json import re import pytest import requests from assets.packages.demo_package import TestPackage from requests import ConnectTimeout from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import ...
package.handle
assert
complex_expr
tests/steamship_tests/app/integration/test_package_instance.py
test_plugin_instance_handle_refs
275
null
steamship-core/python-client
from typing import Any, Dict, Type import pytest from steamship import Steamship, SteamshipError from steamship.agents.llms import OpenAI from steamship.agents.mixins.transports.telegram import TelegramTransport, TelegramTransportConfig from steamship.agents.react import ReACTAgent from steamship.agents.schema import...
"baz"
assert
string_literal
tests/steamship_tests/app/unit/test_routes_on_superclasses.py
test_l1_routes
105
null
steamship-core/python-client
from typing import Callable, Optional import pytest from assets.packages.configurable_hello_world import HelloWorld from assets.packages.demo_package import TestPackage from assets.packages.fancy_types import FancyTypes from assets.packages.optional_params import OptionalParams @pytest.mark.parametrize("invocable_han...
None
assert
none_literal
tests/steamship_tests/app/unit/test_demo_app_spec.py
test_package_spec
15
null
steamship-core/python-client
import pytest from steamship import Block, File, Steamship from steamship.agents.react import ReACTOutputParser @pytest.mark.usefixtures("client") def test_parse_output(client: Steamship): file = File.create(client, blocks=[Block(text="test"), Block(text="Another test")]) block_id = file.blocks[0].id blo...
block_id
assert
variable
tests/steamship_tests/agents/test_react_parse_output.py
test_parse_output
19
null
steamship-core/python-client
from typing import Any from steamship.base.mime_types import MimeTypes from steamship.data.file import File from steamship.invocable import InvocableResponse from steamship.plugin.outputs.block_and_tag_plugin_output import BlockAndTagPluginOutput def check_mime(d: dict, mime: str): assert d.get("http", {}).get("...
mime
assert
variable
tests/steamship_tests/app/unit/test_response.py
check_mime
10
null
steamship-core/python-client
import base64 import json import re import pytest import requests from assets.packages.demo_package import TestPackage from requests import ConnectTimeout from steamship_tests import PACKAGES_PATH, TEST_ASSETS_PATH from steamship_tests.utils.deployables import deploy_package from steamship_tests.utils.fixtures import ...
version.handle
assert
complex_expr
tests/steamship_tests/app/integration/test_package_instance.py
test_plugin_instance_handle_refs
276
null
steamship-core/python-client
import uuid import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import PluginInstance, SteamshipError, Workspace from steamship.data.plugin import Plugin, PluginAdapterType, PluginType from steamship.data.user import User def test_plugin_instance_handle_refs(): steamship ...
"1.0"
assert
string_literal
tests/steamship_tests/data/test_plugins.py
test_plugin_instance_handle_refs
156
null
steamship-core/python-client
import pytest from steamship_tests.utils.client import TESTING_PROFILE from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Steamship, SteamshipError, Workspace from steamship.data.user import User def test_temporary_workspace(): ...
0
assert
numeric_literal
tests/steamship_tests/client/test_client.py
test_temporary_workspace
28
null
steamship-core/python-client
import pytest from assets.packages.package_with_mixins import PackageWithMixin, TestMixin from steamship import SteamshipError from steamship.invocable import ( Invocable, InvocableRequest, InvocableResponse, Invocation, PackageService, post, ) from steamship.utils.url import Verb def invoke(o...
None
assert
none_literal
tests/steamship_tests/app/unit/test_mixins.py
test_package_with_mixin_routes
27
null
steamship-core/python-client
import uuid import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import SteamshipError, Workspace from steamship.base.request import SortOrder def test_default_workspace(): client = get_steamship_client() workspace = Workspace.get(client=client) assert workspace is...
"default"
assert
string_literal
tests/steamship_tests/data/test_workspace.py
test_default_workspace
14
null
steamship-core/python-client
import logging from pathlib import Path from typing import Type from steamship import File from steamship.invocable import Config, InvocableResponse, create_handler from steamship.plugin.inputs.block_and_tag_plugin_input import BlockAndTagPluginInput from steamship.plugin.inputs.train_plugin_input import TrainPluginIn...
None
assert
none_literal
tests/assets/plugins/taggers/plugin_trainable_tagger_config.py
load_from_folder
TestTrainableTaggerConfigModel
28
null
steamship-core/python-client
from steamship_tests.utils.fixtures import get_steamship_client from steamship import File from steamship.base import TaskState def test_file_upload_then_parse(): steamship = get_steamship_client() a = File.create( steamship, content="This is a test.", ) assert a.id is not
None
assert
none_literal
tests/steamship_tests/client/operations/test_blockify.py
test_file_upload_then_parse
14
null
steamship-core/python-client
import uuid import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship import PluginInstance, SteamshipError, Workspace from steamship.data.plugin import Plugin, PluginAdapterType, PluginType from steamship.data.user import User def test_plugin_instance_quick_create(): steamship...
p3.id
assert
complex_expr
tests/steamship_tests/data/test_plugins.py
test_plugin_instance_quick_create
143
null
steamship-core/python-client
import pytest from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_index, random_name from steamship import SteamshipError, Tag from steamship.data.embeddings import EmbeddedItem _TEST_EMBEDDER = "test-embedder" def _list_equal(actual, expected): assert ...
0
assert
numeric_literal
tests/steamship_tests/client/operations/test_embedding_index.py
test_index_usage
172
null
steamship-core/python-client
import os import shutil import tempfile from pathlib import Path from steamship_tests import TEST_ASSETS_PATH from steamship.utils.zip_archives import unzip_folder, zip_folder def test_zip_unzip(): # Copy the test assets to a temp folder tempbase = tempfile.mkdtemp() shutil.copytree(TEST_ASSETS_PATH, os....
dest_files
assert
variable
tests/steamship_tests/utils/test_zip_archives.py
test_zip_unzip
43
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship import Steamship @pytest.mark.usefixtures("client") def test_mixin_and_package_invocation(client: Steamship): demo_package_path = PACKAGES_PATH / "package_with_mixins.py" with d...
"mixin yo"
assert
string_literal
tests/steamship_tests/app/integration/test_e2e_mixins.py
test_mixin_and_package_invocation
14
null
steamship-core/python-client
from enum import Enum import pytest from steamship_tests.utils.client import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Steamship, Workspace from steamship.utils.kv_store import KeyValueStore @pytest.mark.usefixtures("client") def test_kv_namespace_works(client: S...
val1
assert
variable
tests/steamship_tests/utils/test_kv_store.py
test_kv_namespace_works
118
null
steamship-core/python-client
import os import shutil import tempfile from pathlib import Path from steamship_tests import TEST_ASSETS_PATH from steamship_tests.utils.fixtures import get_steamship_client from steamship_tests.utils.random import random_name from steamship import Workspace from steamship.data.workspace import SignedUrl from steamsh...
f2c
assert
variable
tests/steamship_tests/utils/test_signed_urls.py
test_upload_download_text
75
null
steamship-core/python-client
import pytest from steamship import Steamship from steamship.agents.schema.chathistory import ChatHistory from steamship.data.tags.tag_constants import ChatTag, TagKind from steamship.data.tags.tag_utils import get_tag @pytest.mark.usefixtures("client") def test_chat_history_index_init(client: Steamship): contex...
0
assert
numeric_literal
tests/steamship_tests/agents/test_chat_history.py
test_chat_history_index_init
34
null
steamship-core/python-client
import pytest from steamship_tests import PACKAGES_PATH from steamship_tests.utils.deployables import deploy_package from steamship import MimeTypes, Steamship, Task, TaskState from steamship.data.plugin.index_plugin_instance import SearchResults @pytest.mark.usefixtures("client") def test_indexer_pipeline_mixin(clie...
None
assert
none_literal
tests/steamship_tests/app/integration/test_e2e_mixins_indexer_pipeline.py
test_indexer_pipeline_mixin
58
null
steamship-core/python-client
from typing import Callable, Optional import pytest from assets.packages.configurable_hello_world import HelloWorld from assets.packages.demo_package import TestPackage from assets.packages.fancy_types import FancyTypes from assets.packages.optional_params import OptionalParams @pytest.mark.parametrize("invocable_han...
"value1"
assert
string_literal
tests/steamship_tests/app/unit/test_demo_app_spec.py
test_package_spec_fancy_types
51
null
steamship-core/python-client
import json import logging import time from typing import Any, List, Optional, Union import pytest import requests import sseclient from pydantic.fields import PrivateAttr from steamship_tests import SRC_PATH from steamship_tests.utils.deployables import deploy_package from steamship import Block, File, Steamship, St...
None
assert
none_literal
tests/steamship_tests/agents/test_agent_service.py
test_async_prompt
306
null
steamship-core/python-client
import contextlib import io import os import zipfile from pathlib import Path from typing import Any, Dict, List, Optional from steamship_tests import ROOT_PATH, SRC_PATH, TEST_ASSETS_PATH from steamship import Package, PackageInstance, PackageVersion, Steamship from steamship.data.invocable_init_status import Invoca...
version.id
assert
complex_expr
tests/steamship_tests/utils/deployables.py
deploy_package
147
null
steamship-core/python-client
from typing import Callable, Optional import pytest from assets.packages.configurable_hello_world import HelloWorld from assets.packages.demo_package import TestPackage from assets.packages.fancy_types import FancyTypes from assets.packages.optional_params import OptionalParams @pytest.mark.parametrize("invocable_han...
5
assert
numeric_literal
tests/steamship_tests/app/unit/test_demo_app_spec.py
test_package_spec_fancy_types
45
null
steamship-core/python-client
import pytest from steamship import Steamship from steamship.agents.schema import AgentContext @pytest.mark.usefixtures("client") def test_same_context(client: Steamship): context1 = AgentContext.get_or_create(client=client, context_keys={"one": "one", "two": "two"}) contextsame = AgentContext.get_or_create( ...
contextsame.id
assert
complex_expr
tests/steamship_tests/utils/context.py
test_same_context
14
null
steamship-core/python-client
import json import pytest from steamship.client import Steamship from steamship.data.block import Block from steamship.data.file import File from steamship.data.tags.tag import Tag @pytest.mark.usefixtures("client") def test_serialize_client_to_json_works(client: Steamship): assert "use" not in client.dict().key...
None
assert
none_literal
tests/steamship_tests/base/test_serialization.py
test_serialize_client_to_json_works
29
null
steamship-core/python-client
import pytest from steamship import Block, Steamship from steamship.agents.llms import OpenAI from steamship.agents.schema import AgentContext from steamship.agents.tools.classification.multiple_choice_tool import MultipleChoiceTool from steamship.agents.utils import with_llm TESTS = [ ("Pencil", "Other"), ("...
1
assert
numeric_literal
tests/steamship_tests/agents/tools/test_multiple_choice_tool.py
test_multiple_choice_tool
27
null