From 1329b8daf17d7b7ba69e736759b006ffbe574f36 Mon Sep 17 00:00:00 2001 From: thejumpman2323 Date: Fri, 8 Dec 2023 19:30:55 +0530 Subject: [PATCH] Test db validate query --- test/integration/test_ibis.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/integration/test_ibis.py b/test/integration/test_ibis.py index 19f88b11a7..7329bf95ba 100644 --- a/test/integration/test_ibis.py +++ b/test/integration/test_ibis.py @@ -11,6 +11,7 @@ from superduperdb.backends.ibis.query import RawSQL, Table from superduperdb.backends.local.artifacts import FileSystemArtifactStore from superduperdb.backends.sqlalchemy.metadata import SQLAlchemyMetadata +from superduperdb.base import exceptions from superduperdb.base.datalayer import Datalayer from superduperdb.base.document import Document as D from superduperdb.components.schema import Schema @@ -190,6 +191,10 @@ def postprocess(x): {'id': '4'}, ] + # Test bad query + with pytest.raises(exceptions.QueryValidationError): + db.validate(q.gibberish_query()) + def test_nested_query(ibis_sqllite_db): db = ibis_sqllite_db