]> granicus.if.org Git - python/commitdiff
follow up to bug 1007 commit.
authorGregory P. Smith <greg@mad-scientist.com>
Fri, 24 Aug 2007 22:14:21 +0000 (22:14 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Fri, 24 Aug 2007 22:14:21 +0000 (22:14 +0000)
Use self.assertTrue in test cases rather than the assert statement.

Lib/test/test_dumbdbm.py
Lib/test/test_whichdb.py

index d5a74fbf1af7b482ad79b9df4bdd7ad5fa4e47c8..f327a5ae52c2b355515ab92589cee07ca387b29c 100644 (file)
@@ -92,7 +92,7 @@ class DumbDBMTestCase(unittest.TestCase):
     def test_write_contains(self):
         f = dumbdbm.open(_fname)
         f[b'1'] = b'hello'
-        assert b'1' in f
+        self.assertTrue(b'1' in f)
         f.close()
 
     def test_write_write_read(self):
index d3eda84deb3b44bf459397e7b8471c70840163c8..d1cac1dfc10015d058bd7382bf9c4a8d8cb4ece7 100644 (file)
@@ -35,9 +35,9 @@ class WhichDBTestCase(unittest.TestCase):
             f = module.open(_fname, 'w')
             f[b"1"] = b"1"
             # and test that we can find it
-            assert b"1" in f
+            self.assertTrue(b"1" in f)
             # and read it
-            assert f[b"1"] == b"1"
+            self.assertTrue(f[b"1"] == b"1")
             f.close()
             self.assertEqual(name, whichdb.whichdb(_fname))