Skip to content

Commit 9cec913

Browse files
committed
Chore: Improve test alignment
1 parent c703e0a commit 9cec913

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/test_schema.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ def test_correct_schema(cratedb_service):
1010
database = cratedb_service.database
1111

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

16+
inspector: sa.Inspector = sa.inspect(database.engine)
1617
assert TESTDRIVE_DATA_SCHEMA in inspector.get_schema_names()
1718

1819
table_names = inspector.get_table_names(schema=TESTDRIVE_DATA_SCHEMA)

tests/vector_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ def test_float_vector_as_generic():
215215
assert fv.python_type is list
216216

217217

218-
def test_float_vector_integration():
218+
def test_float_vector_integration(cratedb_service):
219219
"""
220220
An integration test for `FLOAT_VECTOR` and `KNN_SEARCH`.
221221
"""
222222
np = pytest.importorskip("numpy")
223223

224-
engine = sa.create_engine(f"crate://")
224+
engine = cratedb_service.database.engine
225225
session = sessionmaker(bind=engine)()
226226
Base = declarative_base()
227227

0 commit comments

Comments
 (0)