test #6520
(self)
| 593 | ) |
| 594 | |
| 595 | def test_pickle_within_group(self): |
| 596 | """test #6520""" |
| 597 | |
| 598 | # TODO: the test/sql package lacks a comprehensive pickling |
| 599 | # test suite even though there are __reduce__ methods in several |
| 600 | # places in sql/elements.py. likely as part of |
| 601 | # test/sql/test_compare.py might be a place this can happen but |
| 602 | # this still relies upon a strategy for table metadata as we have |
| 603 | # in serializer. |
| 604 | |
| 605 | f1 = func.percentile_cont(literal(1)).within_group() |
| 606 | |
| 607 | self.assert_compile( |
| 608 | pickle.loads(pickle.dumps(f1)), |
| 609 | "percentile_cont(:param_1) WITHIN GROUP (ORDER BY )", |
| 610 | ) |
| 611 | |
| 612 | f1 = func.percentile_cont(literal(1)).within_group( |
| 613 | column("q"), column("p").desc() |
| 614 | ) |
| 615 | self.assert_compile( |
| 616 | pickle.loads(pickle.dumps(f1)), |
| 617 | "percentile_cont(:param_1) WITHIN GROUP (ORDER BY q, p DESC)", |
| 618 | ) |
| 619 | |
| 620 | def test_functions_with_cols(self): |
| 621 | users = table( |
nothing calls this directly
no test coverage detected