Mercurial > p > roundup > code
diff test/test_db.py @ 1174:8e318dfaf479
Verify contents of tracker module when the tracker is opened
Performance improvements in *dbm and sq backends
New benchmark module. To use:
PYTHONPATH=. python2 test/benchmark.py
(yes, it's a little basic at present ;)
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 20 Sep 2002 01:20:32 +0000 |
| parents | af104fa52746 |
| children | bd3b57859c37 |
line wrap: on
line diff
--- a/test/test_db.py Thu Sep 19 05:30:25 2002 +0000 +++ b/test/test_db.py Fri Sep 20 01:20:32 2002 +0000 @@ -15,7 +15,7 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_db.py,v 1.50 2002-09-19 02:37:41 richard Exp $ +# $Id: test_db.py,v 1.51 2002-09-20 01:20:32 richard Exp $ import unittest, os, shutil, time @@ -158,6 +158,14 @@ self.db.user.set('1', age=None) self.assertEqual(self.db.user.get('1', "age"), None) + def testKeyValue(self): + newid = self.db.user.create(username="spam") + self.assertEqual(self.db.user.lookup('spam'), newid) + self.db.commit() + self.assertEqual(self.db.user.lookup('spam'), newid) + self.db.user.retire(newid) + self.assertRaises(KeyError, self.db.user.lookup, 'spam') + def testNewProperty(self): self.db.issue.create(title="spam", status='1') self.db.issue.addprop(fixer=Link("user")) @@ -712,7 +720,7 @@ unittest.makeSuite(anydbmDBTestCase, 'test'), unittest.makeSuite(anydbmReadOnlyDBTestCase, 'test') ] - #return unittest.TestSuite(l) +# return unittest.TestSuite(l) try: import sqlite @@ -720,6 +728,7 @@ l.append(unittest.makeSuite(sqliteReadOnlyDBTestCase, 'test')) except: print 'sqlite module not found, skipping gadfly DBTestCase' +# return unittest.TestSuite(l) try: import gadfly
