Mercurial > p > mysql-python > mysqldb-2
diff tests/test_MySQLdb_capabilities.py @ 67:98d968f5af11 MySQLdb
Reimplement MySQL->Python type conversion in C; much simpler and easier to deal with now. Hey, all my tests pass, so I guess that means I need to write some more tests.
author | adustman |
---|---|
date | Mon, 30 Mar 2009 20:21:24 +0000 |
parents | 5a7c30cd9de2 |
children | c0c00294239b |
line wrap: on
line diff
--- a/tests/test_MySQLdb_capabilities.py Sun Mar 29 16:26:30 2009 +0000 +++ b/tests/test_MySQLdb_capabilities.py Mon Mar 30 20:21:24 2009 +0000 @@ -13,7 +13,7 @@ connect_kwargs = dict(db='test', read_default_file='~/.my.cnf', charset='utf8', sql_mode="ANSI,STRICT_TRANS_TABLES,TRADITIONAL") create_table_extra = "ENGINE=INNODB CHARACTER SET UTF8" - leak_test = True + leak_test = False def quote_identifier(self, ident): return "`%s`" % ident @@ -96,6 +96,15 @@ def test_ping(self): self.connection.ping() + def test_literal_int(self): + self.failUnless("2" == self.connection.literal(2)) + + def test_literal_float(self): + self.failUnless("3.1415" == self.connection.literal(3.1415)) + + def test_literal_string(self): + self.failUnless("'foo'" == self.connection.literal("foo")) + if __name__ == '__main__': if test_MySQLdb.leak_test: