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

Method test_string

pymysql/tests/test_basic.py:112–122  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110 c.execute("drop table test_dict")
111
112 def test_string(self):
113 conn = self.connect()
114 c = conn.cursor()
115 c.execute("create table test_dict (a text)")
116 test_value = "I am a test string"
117 try:
118 c.execute("insert into test_dict (a) values (%s)", test_value)
119 c.execute("select a from test_dict")
120 self.assertEqual((test_value,), c.fetchone())
121 finally:
122 c.execute("drop table test_dict")
123
124 def test_integer(self):
125 conn = self.connect()

Callers

nothing calls this directly

Calls 4

cursorMethod · 0.80
executeMethod · 0.80
connectMethod · 0.45
fetchoneMethod · 0.45

Tested by

no test coverage detected