Skip to content

Commit

Permalink
Chore: Improve test alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jun 21, 2024
1 parent 4a6149d commit b9157e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ def test_correct_schema(cratedb_service):
database = cratedb_service.database

tablename = f'"{TESTDRIVE_DATA_SCHEMA}"."foobar"'
inspector: sa.Inspector = sa.inspect(database.engine)
database.run_sql(f"DROP TABLE IF EXISTS {tablename}")
database.run_sql(f"CREATE TABLE {tablename} AS SELECT 1")

inspector: sa.Inspector = sa.inspect(database.engine)
assert TESTDRIVE_DATA_SCHEMA in inspector.get_schema_names()

table_names = inspector.get_table_names(schema=TESTDRIVE_DATA_SCHEMA)
Expand Down
4 changes: 2 additions & 2 deletions tests/vector_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,13 @@ def test_float_vector_as_generic():
assert fv.python_type is list


def test_float_vector_integration():
def test_float_vector_integration(cratedb_service):
"""
An integration test for `FLOAT_VECTOR` and `KNN_SEARCH`.
"""
np = pytest.importorskip("numpy")

engine = sa.create_engine(f"crate://")
engine = cratedb_service.database.engine
session = sessionmaker(bind=engine)()
Base = declarative_base()

Expand Down

0 comments on commit b9157e4

Please sign in to comment.