MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_single_tuple

Method test_single_tuple

pymysql/tests/test_basic.py:286–297  ·  view source on GitHub ↗

test a single tuple

(self)

Source from the content-addressed store, hash-verified

284 c.execute("drop table test_aggregates")
285
286 def test_single_tuple(self):
287 """test a single tuple"""
288 conn = self.connect()
289 c = conn.cursor()
290 self.safe_create_table(
291 conn, "mystuff", "create table mystuff (id integer primary key)"
292 )
293 c.execute("insert into mystuff (id) values (1)")
294 c.execute("insert into mystuff (id) values (2)")
295 c.execute("select id from mystuff where id in %s", ((1,),))
296 self.assertEqual([(1,)], list(c.fetchall()))
297 c.close()
298
299 def test_json(self):
300 args = self.databases[0].copy()

Callers

nothing calls this directly

Calls 6

cursorMethod · 0.80
safe_create_tableMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45
fetchallMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected