summaryrefslogtreecommitdiff
path: root/test/sql/test_operators.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/sql/test_operators.py')
-rw-r--r--test/sql/test_operators.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/sql/test_operators.py b/test/sql/test_operators.py
index eb2885658..9da9d94c3 100644
--- a/test/sql/test_operators.py
+++ b/test/sql/test_operators.py
@@ -325,6 +325,18 @@ class ExtensionOperatorTest(fixtures.TestBase, testing.AssertsCompiledSQL):
"x -> :x_1"
)
+ def test_no_endless_list_call(self):
+ class MyType(UserDefinedType):
+ class comparator_factory(UserDefinedType.Comparator):
+ def __getitem__(self, index):
+ return self.op("->")(index)
+
+ assert_raises_message(
+ NotImplementedError,
+ "Class <class 'sqlalchemy.schema.Column'> is not iterable",
+ list, Column('x', MyType())
+ )
+
def test_lshift(self):
class MyType(UserDefinedType):
class comparator_factory(UserDefinedType.Comparator):