MCPcopy Index your code
hub / github.com/PyMySQL/mysqlclient / test_None

Method test_None

tests/dbapi20.py:798–810  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

796 raise NotImplementedError("Driver need to override this test")
797
798 def test_None(self):
799 con = self._connect()
800 try:
801 cur = con.cursor()
802 self.executeDDL1(cur)
803 cur.execute("insert into %sbooze values (NULL)" % self.table_prefix)
804 cur.execute("select name from %sbooze" % self.table_prefix)
805 r = cur.fetchall()
806 self.assertEqual(len(r), 1)
807 self.assertEqual(len(r[0]), 1)
808 self.assertEqual(r[0][0], None, "NULL value not returned as None")
809 finally:
810 con.close()
811
812 def test_Date(self):
813 d1 = self.driver.Date(2002, 12, 25) # noqa F841

Callers

nothing calls this directly

Calls 6

_connectMethod · 0.95
executeDDL1Method · 0.95
cursorMethod · 0.80
executeMethod · 0.80
closeMethod · 0.80
fetchallMethod · 0.45

Tested by

no test coverage detected