From 70a28d7cbfebc244415de46382d88e31a7ea4ede Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 18 Mar 2003 23:28:16 +0000 Subject: [PATCH] additional Number test git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1605 57a73879-2fb5-44c3-a270-3262357dd7e2 --- test/test_db.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/test_db.py b/test/test_db.py index cb7e115..7d610b5 100644 --- a/test/test_db.py +++ b/test/test_db.py @@ -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.79 2003-03-18 00:50:24 richard Exp $ +# $Id: test_db.py,v 1.80 2003-03-18 23:28:16 richard Exp $ import unittest, os, shutil, time @@ -256,6 +256,12 @@ class anydbmDBTestCase(MyTestCase): self.db.user.set(nid, age=3) self.assertNotEqual(self.db.user.get(nid, 'age'), 1) self.db.user.set(nid, age=1.0) + self.assertEqual(self.db.user.get(nid, 'age'), 1) + self.db.user.set(nid, age=0) + self.assertEqual(self.db.user.get(nid, 'age'), 0) + + nid = self.db.user.create(username='bar', age=0) + self.assertEqual(self.db.user.get(nid, 'age'), 0) def testNumberUnset(self): nid = self.db.user.create(username='foo', age=1) @@ -889,14 +895,16 @@ class metakitReadOnlyDBTestCase(anydbmReadOnlyDBTestCase): setupSchema(self.db, 0, metakit) def suite(): + p = [] + l = [ unittest.makeSuite(anydbmDBTestCase, 'test'), unittest.makeSuite(anydbmReadOnlyDBTestCase, 'test') ] + p.append('anydbm') #return unittest.TestSuite(l) from roundup import backends - p = [] if hasattr(backends, 'mysql'): from roundup.backends import mysql try: -- 2.30.2