| 812 | eq_(repickled.orig.args[0], orig.args[0]) |
| 813 | |
| 814 | def test_dont_wrap_mixin(self): |
| 815 | class MyException(Exception, tsa.exc.DontWrapMixin): |
| 816 | pass |
| 817 | |
| 818 | class MyType(TypeDecorator): |
| 819 | impl = Integer |
| 820 | cache_ok = True |
| 821 | |
| 822 | def process_bind_param(self, value, dialect): |
| 823 | raise MyException("nope") |
| 824 | |
| 825 | def _go(conn): |
| 826 | assert_raises_message( |
| 827 | MyException, |
| 828 | "nope", |
| 829 | conn.execute, |
| 830 | select(1).where(column("foo") == literal("bar", MyType())), |
| 831 | ) |
| 832 | |
| 833 | conn = testing.db.connect() |
| 834 | try: |
| 835 | _go(conn) |
| 836 | finally: |
| 837 | conn.close() |
| 838 | |
| 839 | def test_empty_insert(self, connection): |
| 840 | """test that execute() interprets [] as a list with no params""" |