(self, is_in, negate)
| 2644 | @testing.combinations(True, False, argnames="is_in") |
| 2645 | @testing.combinations(True, False, argnames="negate") |
| 2646 | def test_in_empty_single(self, is_in, negate): |
| 2647 | a = column("a", Integer) |
| 2648 | |
| 2649 | if negate: |
| 2650 | expr = ~a.not_in([]) if is_in else ~a.in_([]) |
| 2651 | else: |
| 2652 | expr = a.in_([]) if is_in else a.not_in([]) |
| 2653 | |
| 2654 | if is_in: |
| 2655 | self.assert_compile( |
| 2656 | expr, |
| 2657 | "a IN (__[POSTCOMPILE_a_1])", |
| 2658 | checkparams={"a_1": []}, |
| 2659 | ) |
| 2660 | self.assert_compile( |
| 2661 | expr, |
| 2662 | "a IN (NULL) AND (1 != 1)", |
| 2663 | literal_binds=True, |
| 2664 | dialect="default_enhanced", |
| 2665 | ) |
| 2666 | else: |
| 2667 | self.assert_compile( |
| 2668 | expr, |
| 2669 | "(a NOT IN (__[POSTCOMPILE_a_1]))", |
| 2670 | checkparams={"a_1": []}, |
| 2671 | ) |
| 2672 | self.assert_compile( |
| 2673 | expr, |
| 2674 | "(a NOT IN (NULL) OR (1 = 1))", |
| 2675 | literal_binds=True, |
| 2676 | dialect="default_enhanced", |
| 2677 | ) |
| 2678 | |
| 2679 | def test_in_self_plus_negated(self): |
| 2680 | a = column("a", Integer) |
nothing calls this directly
no test coverage detected