| 745 | |
| 746 | @testing.requires.tuple_in |
| 747 | def test_expanding_in_composite(self, connection): |
| 748 | users = self.tables.users |
| 749 | |
| 750 | connection.execute( |
| 751 | users.insert(), |
| 752 | [ |
| 753 | dict(user_id=7, user_name="jack"), |
| 754 | dict(user_id=8, user_name="fred"), |
| 755 | dict(user_id=9, user_name=None), |
| 756 | ], |
| 757 | ) |
| 758 | |
| 759 | stmt = ( |
| 760 | select(users) |
| 761 | .where( |
| 762 | tuple_(users.c.user_id, users.c.user_name).in_( |
| 763 | bindparam("uname", expanding=True) |
| 764 | ) |
| 765 | ) |
| 766 | .order_by(users.c.user_id) |
| 767 | ) |
| 768 | |
| 769 | eq_( |
| 770 | connection.execute(stmt, {"uname": [(7, "jack")]}).fetchall(), |
| 771 | [(7, "jack")], |
| 772 | ) |
| 773 | |
| 774 | eq_( |
| 775 | connection.execute( |
| 776 | stmt, {"uname": [(7, "jack"), (8, "fred")]} |
| 777 | ).fetchall(), |
| 778 | [(7, "jack"), (8, "fred")], |
| 779 | ) |
| 780 | |
| 781 | def test_expanding_in_dont_alter_compiled(self, connection): |
| 782 | """test for issue #5048""" |