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

Method test_issue_4

pymysql/tests/test_issues.py:43–56  ·  view source on GitHub ↗

can't retrieve TIMESTAMP fields

(self)

Source from the content-addressed store, hash-verified

41 c.execute("drop table issue3")
42
43 def test_issue_4(self):
44 """can't retrieve TIMESTAMP fields"""
45 conn = self.connect()
46 c = conn.cursor()
47 with warnings.catch_warnings():
48 warnings.filterwarnings("ignore")
49 c.execute("drop table if exists issue4")
50 c.execute("create table issue4 (ts timestamp)")
51 try:
52 c.execute("insert into issue4 (ts) values (now())")
53 c.execute("select ts from issue4")
54 self.assertTrue(isinstance(c.fetchone()[0], datetime.datetime))
55 finally:
56 c.execute("drop table issue4")
57
58 def test_issue_5(self):
59 """query on information_schema.tables fails"""

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