Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import FixtureRequest from pytest #645

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions libs/colbert/tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Iterator

import pytest
from _pytest.fixtures import FixtureRequest
from cassandra.cluster import Session
from ragstack_tests_utils import AstraDBTestStore, LocalCassandraTestStore

Expand All @@ -20,7 +19,7 @@ def astra_db() -> AstraDBTestStore:


@pytest.fixture()
def session(request: FixtureRequest) -> Session:
def session(request: pytest.FixtureRequest) -> Session:
test_store = request.getfixturevalue(request.param)
session = test_store.create_cassandra_session()
session.default_timeout = 180
Expand Down
5 changes: 2 additions & 3 deletions libs/langchain/tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Iterator

import pytest
from _pytest.fixtures import FixtureRequest
from cassandra.cluster import Session
from dotenv import load_dotenv
from ragstack_tests_utils import AstraDBTestStore, LocalCassandraTestStore
Expand All @@ -22,13 +21,13 @@ def astra_db() -> AstraDBTestStore:
return AstraDBTestStore()


def get_session(request: FixtureRequest) -> Session:
def get_session(request: pytest.FixtureRequest) -> Session:
test_store = request.getfixturevalue(request.param)
session = test_store.create_cassandra_session()
session.default_timeout = 180
return session


@pytest.fixture()
def session(request: FixtureRequest) -> Session:
def session(request: pytest.FixtureRequest) -> Session:
return get_session(request)
3 changes: 1 addition & 2 deletions libs/llamaindex/tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Iterator

import pytest
from _pytest.fixtures import FixtureRequest
from cassandra.cluster import Session
from ragstack_tests_utils import AstraDBTestStore, LocalCassandraTestStore

Expand All @@ -20,7 +19,7 @@ def astra_db() -> AstraDBTestStore:


@pytest.fixture()
def session(request: FixtureRequest) -> Session:
def session(request: pytest.FixtureRequest) -> Session:
test_store = request.getfixturevalue(request.param)
session = test_store.create_cassandra_session()
session.default_timeout = 180
Expand Down
Loading