ref: Remove useless pytest.mark.asyncio (#4364)
This commit is contained in:
parent
dc4e0e5ce1
commit
df22924b0e
22 changed files with 0 additions and 53 deletions
|
|
@ -5,7 +5,6 @@ from tests.api_keys import get_openai_api_key
|
|||
from tests.integration.utils import download_flow_from_github, run_json_flow
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.api_key_required
|
||||
async def test_1_0_15_basic_prompting():
|
||||
api_key = get_openai_api_key()
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ async def test_list_assistants():
|
|||
|
||||
|
||||
@pytest.mark.api_key_required
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_assistants():
|
||||
from langflow.components.astra_assistants import AssistantsCreateAssistant
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ def astradb_client():
|
|||
|
||||
|
||||
@pytest.mark.api_key_required
|
||||
@pytest.mark.asyncio
|
||||
async def test_base(astradb_client: AstraDB):
|
||||
from langflow.components.embeddings import OpenAIEmbeddingsComponent
|
||||
|
||||
|
|
@ -65,7 +64,6 @@ async def test_base(astradb_client: AstraDB):
|
|||
|
||||
|
||||
@pytest.mark.api_key_required
|
||||
@pytest.mark.asyncio
|
||||
async def test_astra_embeds_and_search():
|
||||
application_token = get_astradb_application_token()
|
||||
api_endpoint = get_astradb_api_endpoint()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import pytest
|
||||
from langflow.components.helpers import ParseJSONDataComponent
|
||||
from langflow.components.inputs import ChatInput
|
||||
from langflow.schema import Data
|
||||
|
|
@ -7,7 +6,6 @@ from tests.integration.components.mock_components import TextToData
|
|||
from tests.integration.utils import ComponentInputHandle, run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_from_data():
|
||||
outputs = await run_single_component(
|
||||
ParseJSONDataComponent,
|
||||
|
|
@ -34,7 +32,6 @@ async def test_from_data():
|
|||
assert outputs["filtered_data"] == [Data(text="2")]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_from_message():
|
||||
outputs = await run_single_component(
|
||||
ParseJSONDataComponent,
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import pytest
|
||||
from langflow.components.inputs import ChatInput
|
||||
from langflow.memory import get_messages
|
||||
from langflow.schema.message import Message
|
||||
|
|
@ -6,7 +5,6 @@ from langflow.schema.message import Message
|
|||
from tests.integration.utils import run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_default():
|
||||
outputs = await run_single_component(ChatInput, run_input="hello")
|
||||
assert isinstance(outputs["message"], Message)
|
||||
|
|
@ -21,7 +19,6 @@ async def test_default():
|
|||
assert outputs["message"].sender_name == "User"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_sender():
|
||||
outputs = await run_single_component(
|
||||
ChatInput, inputs={"sender": "Machine", "sender_name": "AI"}, run_input="hello"
|
||||
|
|
@ -32,7 +29,6 @@ async def test_sender():
|
|||
assert outputs["message"].sender_name == "AI"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_do_not_store_messages():
|
||||
session_id = "test-session-id"
|
||||
outputs = await run_single_component(
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import pytest
|
||||
from langflow.components.inputs import TextInputComponent
|
||||
from langflow.schema.message import Message
|
||||
|
||||
from tests.integration.utils import run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_text_input():
|
||||
outputs = await run_single_component(TextInputComponent, run_input="sample text", input_type="text")
|
||||
assert isinstance(outputs["text"], Message)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ from langflow.components.prompts import PromptComponent
|
|||
from tests.integration.utils import ComponentInputHandle, run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.api_key_required
|
||||
async def test_csv_output_parser_openai():
|
||||
format_instructions = ComponentInputHandle(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import pytest
|
||||
from langflow.components.outputs import ChatOutput
|
||||
from langflow.memory import get_messages
|
||||
from langflow.schema.message import Message
|
||||
|
|
@ -6,7 +5,6 @@ from langflow.schema.message import Message
|
|||
from tests.integration.utils import run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_string():
|
||||
outputs = await run_single_component(ChatOutput, inputs={"input_value": "hello"})
|
||||
assert isinstance(outputs["message"], Message)
|
||||
|
|
@ -15,7 +13,6 @@ async def test_string():
|
|||
assert outputs["message"].sender_name == "AI"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_message():
|
||||
outputs = await run_single_component(ChatOutput, inputs={"input_value": Message(text="hello")})
|
||||
assert isinstance(outputs["message"], Message)
|
||||
|
|
@ -24,7 +21,6 @@ async def test_message():
|
|||
assert outputs["message"].sender_name == "AI"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_do_not_store_message():
|
||||
session_id = "test-session-id"
|
||||
outputs = await run_single_component(
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import pytest
|
||||
from langflow.components.outputs import TextOutputComponent
|
||||
from langflow.schema.message import Message
|
||||
|
||||
from tests.integration.utils import run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test():
|
||||
outputs = await run_single_component(TextOutputComponent, inputs={"input_value": "hello"})
|
||||
assert isinstance(outputs["text"], Message)
|
||||
|
|
@ -14,7 +12,6 @@ async def test():
|
|||
assert outputs["text"].sender_name is None
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_message():
|
||||
outputs = await run_single_component(TextOutputComponent, inputs={"input_value": Message(text="hello")})
|
||||
assert isinstance(outputs["text"], Message)
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
import pytest
|
||||
from langflow.components.prompts import PromptComponent
|
||||
from langflow.schema.message import Message
|
||||
|
||||
from tests.integration.utils import run_single_component
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test():
|
||||
outputs = await run_single_component(PromptComponent, inputs={"template": "test {var1}", "var1": "from the var"})
|
||||
assert isinstance(outputs["prompt"], Message)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import pytest
|
||||
from langflow.components.inputs import ChatInput
|
||||
from langflow.components.outputs import ChatOutput
|
||||
from langflow.components.prompts import PromptComponent
|
||||
|
|
@ -8,7 +7,6 @@ from langflow.schema.message import Message
|
|||
from tests.integration.utils import run_flow
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_simple_no_llm():
|
||||
graph = Graph()
|
||||
flow_input = graph.add_component(ChatInput())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue