summaryrefslogtreecommitdiff
path: root/test/sql
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2020-10-12 17:45:10 +0000
committerGerrit Code Review <gerrit@bbpush.zzzcomputing.com>2020-10-12 17:45:10 +0000
commita3e2eb7c3c3fe6b2bebd14a7e9d661b2b4519d1f (patch)
treeeb77a32a75e9a040ef466aa2cc3fdbc4577742aa /test/sql
parent286fe9b0b165e46099066cc16552b93a0b853a7e (diff)
parent9322de12f5c5eca397b13cb7db2b6196f58aceb3 (diff)
downloadsqlalchemy-a3e2eb7c3c3fe6b2bebd14a7e9d661b2b4519d1f.tar.gz
Merge "Repair reduction in Over"
Diffstat (limited to 'test/sql')
-rw-r--r--test/sql/test_functions.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/sql/test_functions.py b/test/sql/test_functions.py
index f9a8f998e..1722a1e69 100644
--- a/test/sql/test_functions.py
+++ b/test/sql/test_functions.py
@@ -483,6 +483,21 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
except AttributeError:
assert True
+ def test_pickle_over(self):
+ # TODO: the test/sql package lacks a comprehensive pickling
+ # test suite even though there are __reduce__ methods in several
+ # places in sql/elements.py. likely as part of
+ # test/sql/test_compare.py might be a place this can happen but
+ # this still relies upon a strategy for table metadata as we have
+ # in serializer.
+
+ f1 = func.row_number().over()
+
+ self.assert_compile(
+ util.pickle.loads(util.pickle.dumps(f1)),
+ "row_number() OVER ()",
+ )
+
def test_functions_with_cols(self):
users = table(
"users", column("id"), column("name"), column("fullname")