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

Method test_escape_builtin_encoders

pymysql/tests/test_connection.py:944–949  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

942 self.assertEqual(cur.fetchone(), (0,))
943
944 def test_escape_builtin_encoders(self):
945 con = self.connect()
946
947 val = datetime.datetime(2012, 3, 4, 5, 6)
948 self.assertEqual(con.escape(val, con.encoders), "'2012-03-04 05:06:00'")
949 self.assertEqual(con.escape(val.timetuple()), "'2012-03-04 05:06:00'")
950
951 def test_escape_custom_object(self):
952 con = self.connect()

Callers

nothing calls this directly

Calls 2

escapeMethod · 0.80
connectMethod · 0.45

Tested by

no test coverage detected