(self, is_in, negate)
| 2478 | @testing.combinations(True, False, argnames="is_in") |
| 2479 | @testing.combinations(True, False, argnames="negate") |
| 2480 | def test_in_empty_single(self, is_in, negate): |
| 2481 | a = column("a", Integer) |
| 2482 | |
| 2483 | if negate: |
| 2484 | expr = ~a.not_in([]) if is_in else ~a.in_([]) |
| 2485 | else: |
| 2486 | expr = a.in_([]) if is_in else a.not_in([]) |
| 2487 | |
| 2488 | if is_in: |
| 2489 | self.assert_compile( |
| 2490 | expr, |
| 2491 | "a IN (__[POSTCOMPILE_a_1])", |
| 2492 | checkparams={"a_1": []}, |
| 2493 | ) |
| 2494 | self.assert_compile( |
| 2495 | expr, |
| 2496 | "a IN (NULL) AND (1 != 1)", |
| 2497 | literal_binds=True, |
| 2498 | dialect="default_enhanced", |
| 2499 | ) |
| 2500 | else: |
| 2501 | self.assert_compile( |
| 2502 | expr, |
| 2503 | "(a NOT IN (__[POSTCOMPILE_a_1]))", |
| 2504 | checkparams={"a_1": []}, |
| 2505 | ) |
| 2506 | self.assert_compile( |
| 2507 | expr, |
| 2508 | "(a NOT IN (NULL) OR (1 = 1))", |
| 2509 | literal_binds=True, |
| 2510 | dialect="default_enhanced", |
| 2511 | ) |
| 2512 | |
| 2513 | def test_in_self_plus_negated(self): |
| 2514 | a = column("a", Integer) |
nothing calls this directly
no test coverage detected