[Python-3000-checkins] r57421 - python/branches/py3k/Lib/test/test_dumbdbm.py python/branches/py3k/Lib/test/test_whichdb.py

gregory.p.smith python-3000-checkins at python.org
Sat Aug 25 00:14:21 CEST 2007


Author: gregory.p.smith
Date: Sat Aug 25 00:14:21 2007
New Revision: 57421

Modified:
   python/branches/py3k/Lib/test/test_dumbdbm.py
   python/branches/py3k/Lib/test/test_whichdb.py
Log:
follow up to bug 1007 commit.
Use self.assertTrue in test cases rather than the assert statement.


Modified: python/branches/py3k/Lib/test/test_dumbdbm.py
==============================================================================
--- python/branches/py3k/Lib/test/test_dumbdbm.py	(original)
+++ python/branches/py3k/Lib/test/test_dumbdbm.py	Sat Aug 25 00:14:21 2007
@@ -92,7 +92,7 @@
     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):

Modified: python/branches/py3k/Lib/test/test_whichdb.py
==============================================================================
--- python/branches/py3k/Lib/test/test_whichdb.py	(original)
+++ python/branches/py3k/Lib/test/test_whichdb.py	Sat Aug 25 00:14:21 2007
@@ -35,9 +35,9 @@
             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))
 


More information about the Python-3000-checkins mailing list