Skip to content
This repository has been archived by the owner on Jul 16, 2024. It is now read-only.

Commit

Permalink
Fixture names are different from hook args
Browse files Browse the repository at this point in the history
  • Loading branch information
Xuebin Su committed Nov 21, 2023
1 parent 1b02fc1 commit 78cbfb9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ def pytest_addoption(parser: pytest.Parser):


@pytest.fixture(scope="session")
def server_use_pickler(config: pytest.Config) -> bool:
val: bool = config.getini("server_use_pickler")
def server_use_pickler(pytestconfig: pytest.Config) -> bool:
val: bool = pytestconfig.getini("server_use_pickler")
return val


@pytest.fixture(scope="session")
def server_has_pgvector(config: pytest.Config) -> bool:
val: bool = config.getini("server_has_pgvector")
def server_has_pgvector(pytestconfig: pytest.Config) -> bool:
val: bool = pytestconfig.getini("server_has_pgvector")
return val


Expand Down
3 changes: 1 addition & 2 deletions tests/test_embedding.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import _pytest
import pytest

import greenplumpython as gp
from tests import db as _


@pytest.mark.requires_pgvector
def test_embedding_query_string(db):
def test_embedding_query_string(db: gp.Database):
content = ["I have a dog.", "I like eating apples."]
t = (
db.create_dataframe(columns={"id": range(len(content)), "content": content})
Expand Down

0 comments on commit 78cbfb9

Please sign in to comment.