MCPcopy Create free account
hub / github.com/PyMySQL/PyMySQL / test_single_tuple

Method test_single_tuple

pymysql/tests/test_basic.py:285–296  ·  view source on GitHub ↗

test a single tuple

(self)

Source from the content-addressed store, hash-verified

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