Patch for string and tuple escaping
(self)
| 126 | c.execute("drop table issue15") |
| 127 | |
| 128 | def test_issue_16(self): |
| 129 | """Patch for string and tuple escaping""" |
| 130 | conn = self.connect() |
| 131 | c = conn.cursor() |
| 132 | with warnings.catch_warnings(): |
| 133 | warnings.filterwarnings("ignore") |
| 134 | c.execute("drop table if exists issue16") |
| 135 | c.execute( |
| 136 | "create table issue16 (name varchar(32) primary key, email varchar(32))" |
| 137 | ) |
| 138 | try: |
| 139 | c.execute( |
| 140 | "insert into issue16 (name, email) values ('pete', 'floydophone')" |
| 141 | ) |
| 142 | c.execute("select email from issue16 where name=%s", ("pete",)) |
| 143 | self.assertEqual("floydophone", c.fetchone()[0]) |
| 144 | finally: |
| 145 | c.execute("drop table issue16") |
| 146 | |
| 147 | @pytest.mark.skip( |
| 148 | "test_issue_17() requires a custom, legacy MySQL configuration and will not be run." |