Mercurial > p > mysql-python > mysqldb-2
comparison 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 |
comparison
equal
deleted
inserted
replaced
36:38bf72f3c3de | 37:df4d804244ec |
---|---|
1 import unittest | 1 import unittest |
2 | 2 |
3 import MySQLdb | 3 import MySQLdb |
4 from MySQLdb.constants import FIELD_TYPE | |
5 | |
6 | |
7 class TestDBAPISet(unittest.TestCase): | |
8 def test_set_equality(self): | |
9 self.assertTrue(MySQLdb.STRING == MySQLdb.STRING) | |
10 | |
11 def test_set_inequality(self): | |
12 self.assertTrue(MySQLdb.STRING != MySQLdb.NUMBER) | |
13 | |
14 def test_set_equality_membership(self): | |
15 self.assertTrue(FIELD_TYPE.VAR_STRING == MySQLdb.STRING) | |
16 | |
17 def test_set_inequality_membership(self): | |
18 self.assertTrue(FIELD_TYPE.DATE != MySQLdb.STRING) | |
4 | 19 |
5 | 20 |
6 class NonStandard(unittest.TestCase): | 21 class NonStandard(unittest.TestCase): |
7 """Test _mysql.connection internals.""" | 22 """Test _mysql.connection internals.""" |
8 | 23 |