diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-10-12 12:47:38 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2020-10-12 12:48:17 -0400 |
| commit | 9322de12f5c5eca397b13cb7db2b6196f58aceb3 (patch) | |
| tree | d0edd9648f8f8cc2f11f8c014caa4007baec9f9d /test | |
| parent | b2f2bf1acc5799221981d30c2bf9ed29d5ca6312 (diff) | |
| download | sqlalchemy-9322de12f5c5eca397b13cb7db2b6196f58aceb3.tar.gz | |
Repair reduction in Over
Fixed issue where a plain pickle dumps call of the :class:`_sql.Over`
construct didn't work.
Fixes: #5644
Change-Id: I4b07f74ecd5d52f0794128585367012200a38a36
Diffstat (limited to 'test')
| -rw-r--r-- | test/sql/test_functions.py | 15 |
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") |
