MCPcopy
hub / github.com/PyMySQL/PyMySQL / test_string

Method test_string

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

Source from the content-addressed store, hash-verified

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