summaryrefslogtreecommitdiffstats
path: root/tests/test_optimizer.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-23 08:42:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-01-23 08:42:55 +0000
commitade4a78e8fabcaa7270b6d4be2187457a3fa115f (patch)
tree018225e76010479b3a568bb6d9ef5df457802885 /tests/test_optimizer.py
parentAdding upstream version 10.5.2. (diff)
downloadsqlglot-ade4a78e8fabcaa7270b6d4be2187457a3fa115f.tar.xz
sqlglot-ade4a78e8fabcaa7270b6d4be2187457a3fa115f.zip
Adding upstream version 10.5.6.upstream/10.5.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_optimizer.py')
-rw-r--r--tests/test_optimizer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_optimizer.py b/tests/test_optimizer.py
index 887f427..af21679 100644
--- a/tests/test_optimizer.py
+++ b/tests/test_optimizer.py
@@ -6,7 +6,7 @@ from pandas.testing import assert_frame_equal
import sqlglot
from sqlglot import exp, optimizer, parse_one
-from sqlglot.errors import OptimizeError
+from sqlglot.errors import OptimizeError, SchemaError
from sqlglot.optimizer.annotate_types import annotate_types
from sqlglot.optimizer.scope import build_scope, traverse_scope, walk_in_scope
from sqlglot.schema import MappingSchema
@@ -161,7 +161,7 @@ class TestOptimizer(unittest.TestCase):
def test_qualify_columns__invalid(self):
for sql in load_sql_fixtures("optimizer/qualify_columns__invalid.sql"):
with self.subTest(sql):
- with self.assertRaises(OptimizeError):
+ with self.assertRaises((OptimizeError, SchemaError)):
optimizer.qualify_columns.qualify_columns(parse_one(sql), schema=self.schema)
def test_lower_identities(self):