Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc2e376 commit f4e1810Copy full SHA for f4e1810
1 file changed
Lib/sqlite3/test/hooks.py
@@ -213,7 +213,10 @@ def trace(statement):
213
traced_statements.append(statement)
214
con.set_trace_callback(trace)
215
con.execute("create table foo(x)")
216
- con.execute("insert into foo(x) values (?)", (unicode_value,))
+ # Can't execute bound parameters as their values don't appear
217
+ # in traced statements before SQLite 3.6.21
218
+ # (cf. http://www.sqlite.org/draft/releaselog/3_6_21.html)
219
+ con.execute('insert into foo(x) values ("%s")' % unicode_value)
220
con.commit()
221
self.assertTrue(any(unicode_value in stmt for stmt in traced_statements),
222
"Unicode data %s garbled in trace callback: %s"
0 commit comments