Mercurial > p > mysql-python > mysqldb-2
diff tests/test_MySQLdb_nonstandard.py @ 37:df4d804244ec MySQLdb
Since tests are easy to run, there's no reason to have them in shipping code.
author | kylev |
---|---|
date | Thu, 12 Feb 2009 00:36:39 +0000 |
parents | 25c5d3b241ba |
children | 2d1a3d9e15b2 |
line wrap: on
line diff
--- a/tests/test_MySQLdb_nonstandard.py Thu Feb 12 00:28:34 2009 +0000 +++ b/tests/test_MySQLdb_nonstandard.py Thu Feb 12 00:36:39 2009 +0000 @@ -1,6 +1,21 @@ import unittest import MySQLdb +from MySQLdb.constants import FIELD_TYPE + + +class TestDBAPISet(unittest.TestCase): + def test_set_equality(self): + self.assertTrue(MySQLdb.STRING == MySQLdb.STRING) + + def test_set_inequality(self): + self.assertTrue(MySQLdb.STRING != MySQLdb.NUMBER) + + def test_set_equality_membership(self): + self.assertTrue(FIELD_TYPE.VAR_STRING == MySQLdb.STRING) + + def test_set_inequality_membership(self): + self.assertTrue(FIELD_TYPE.DATE != MySQLdb.STRING) class NonStandard(unittest.TestCase):