2002-11-19 13:47:07 -04:00
|
|
|
"""
|
|
|
|
TestCases for checking dbShelve objects.
|
|
|
|
"""
|
|
|
|
|
2007-08-28 03:07:12 -03:00
|
|
|
import os
|
2007-08-28 05:05:56 -03:00
|
|
|
import shutil
|
2002-11-19 13:47:07 -04:00
|
|
|
import tempfile, random
|
|
|
|
import unittest
|
|
|
|
|
2007-08-08 19:08:30 -03:00
|
|
|
from bsddb import db, dbshelve
|
2002-11-19 13:47:07 -04:00
|
|
|
|
Merged revisions 61143-61144,61146-61147,61150-61151,61157,61165-61168,61170-61173,61176-61177,61183 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61143 | barry.warsaw | 2008-03-01 03:23:38 +0100 (Sat, 01 Mar 2008) | 2 lines
Bump to version 2.6a1
........
r61144 | barry.warsaw | 2008-03-01 03:26:42 +0100 (Sat, 01 Mar 2008) | 1 line
bump idle version number
........
r61146 | fred.drake | 2008-03-01 03:45:07 +0100 (Sat, 01 Mar 2008) | 2 lines
fix typo
........
r61147 | barry.warsaw | 2008-03-01 03:53:36 +0100 (Sat, 01 Mar 2008) | 1 line
Add date to NEWS
........
r61150 | barry.warsaw | 2008-03-01 04:00:52 +0100 (Sat, 01 Mar 2008) | 1 line
Give IDLE a release date
........
r61151 | barry.warsaw | 2008-03-01 04:15:20 +0100 (Sat, 01 Mar 2008) | 1 line
More copyright year and version number bumps
........
r61157 | barry.warsaw | 2008-03-01 18:11:41 +0100 (Sat, 01 Mar 2008) | 2 lines
Set things up for 2.6a2.
........
r61165 | georg.brandl | 2008-03-02 07:28:16 +0100 (Sun, 02 Mar 2008) | 2 lines
It's 2.6 now.
........
r61166 | georg.brandl | 2008-03-02 07:32:32 +0100 (Sun, 02 Mar 2008) | 2 lines
Update year.
........
r61167 | georg.brandl | 2008-03-02 07:44:08 +0100 (Sun, 02 Mar 2008) | 2 lines
Make patchlevel print out the release if called as a script.
........
r61168 | georg.brandl | 2008-03-02 07:45:40 +0100 (Sun, 02 Mar 2008) | 2 lines
New default basename for HTML help files.
........
r61170 | raymond.hettinger | 2008-03-02 11:59:31 +0100 (Sun, 02 Mar 2008) | 1 line
Finish-up docs for combinations() and permutations() in itertools.
........
r61171 | raymond.hettinger | 2008-03-02 12:17:51 +0100 (Sun, 02 Mar 2008) | 1 line
Tighten example code.
........
r61172 | raymond.hettinger | 2008-03-02 12:57:16 +0100 (Sun, 02 Mar 2008) | 1 line
Simplify code for itertools.product().
........
r61173 | raymond.hettinger | 2008-03-02 13:02:19 +0100 (Sun, 02 Mar 2008) | 1 line
Handle 0-tuples which can be singletons.
........
r61176 | georg.brandl | 2008-03-02 14:41:39 +0100 (Sun, 02 Mar 2008) | 2 lines
Make clear that the constants are strings.
........
r61177 | georg.brandl | 2008-03-02 15:15:04 +0100 (Sun, 02 Mar 2008) | 2 lines
Fix factual error.
........
r61183 | gregory.p.smith | 2008-03-02 21:00:53 +0100 (Sun, 02 Mar 2008) | 4 lines
Modify import of test_support so that the code can also be used with a
stand alone distribution of bsddb that includes its own small copy of
test_support for the needed functionality on older pythons.
........
2008-03-02 18:46:37 -04:00
|
|
|
try:
|
|
|
|
from bsddb3 import test_support
|
|
|
|
except ImportError:
|
|
|
|
from test import test_support
|
|
|
|
|
2007-08-28 05:05:56 -03:00
|
|
|
from bsddb.test.test_all import verbose
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
# We want the objects to be comparable so we can test dbshelve.values
|
|
|
|
# later on.
|
|
|
|
class DataClass:
|
2006-08-24 15:19:44 -03:00
|
|
|
|
2002-11-19 13:47:07 -04:00
|
|
|
def __init__(self):
|
|
|
|
self.value = random.random()
|
|
|
|
|
2006-08-24 15:19:44 -03:00
|
|
|
def __repr__(self):
|
|
|
|
return "DataClass(%r)" % self.value
|
|
|
|
|
|
|
|
def __eq__(self, other):
|
|
|
|
value = self.value
|
|
|
|
if isinstance(other, DataClass):
|
|
|
|
other = other.value
|
|
|
|
return value == other
|
|
|
|
|
|
|
|
def __lt__(self, other):
|
|
|
|
value = self.value
|
|
|
|
if isinstance(other, DataClass):
|
|
|
|
other = other.value
|
|
|
|
return value < other
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-08-22 16:23:36 -03:00
|
|
|
letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
|
|
|
|
2002-11-19 13:47:07 -04:00
|
|
|
class DBShelveTestCase(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
|
|
self.filename = tempfile.mktemp()
|
|
|
|
self.do_open()
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
self.do_close()
|
|
|
|
try:
|
|
|
|
os.remove(self.filename)
|
|
|
|
except os.error:
|
|
|
|
pass
|
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
def mk(self, key):
|
|
|
|
"""Turn key into an appropriate key type for this db"""
|
|
|
|
# override in child class for RECNO
|
|
|
|
return key.encode("ascii")
|
|
|
|
|
2002-11-19 13:47:07 -04:00
|
|
|
def populateDB(self, d):
|
2007-08-22 16:23:36 -03:00
|
|
|
for x in letters:
|
2007-10-12 16:13:19 -03:00
|
|
|
d[self.mk('S' + x)] = 10 * x # add a string
|
|
|
|
d[self.mk('I' + x)] = ord(x) # add an integer
|
|
|
|
d[self.mk('L' + x)] = [x] * 10 # add a list
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
inst = DataClass() # add an instance
|
|
|
|
inst.S = 10 * x
|
|
|
|
inst.I = ord(x)
|
|
|
|
inst.L = [x] * 10
|
2007-10-12 16:13:19 -03:00
|
|
|
d[self.mk('O' + x)] = inst
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
# overridable in derived classes to affect how the shelf is created/opened
|
|
|
|
def do_open(self):
|
|
|
|
self.d = dbshelve.open(self.filename)
|
|
|
|
|
|
|
|
# and closed...
|
|
|
|
def do_close(self):
|
|
|
|
self.d.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test01_basics(self):
|
|
|
|
if verbose:
|
2007-02-09 01:37:30 -04:00
|
|
|
print('\n', '-=' * 30)
|
|
|
|
print("Running %s.test01_basics..." % self.__class__.__name__)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
self.populateDB(self.d)
|
2007-08-28 05:05:56 -03:00
|
|
|
if verbose:
|
|
|
|
print(1, self.d.keys())
|
2002-11-19 13:47:07 -04:00
|
|
|
self.d.sync()
|
2007-08-28 05:05:56 -03:00
|
|
|
if verbose:
|
|
|
|
print(2, self.d.keys())
|
2002-11-19 13:47:07 -04:00
|
|
|
self.do_close()
|
|
|
|
self.do_open()
|
2007-08-28 05:05:56 -03:00
|
|
|
if verbose:
|
|
|
|
print(3, self.d.keys())
|
2002-11-19 13:47:07 -04:00
|
|
|
d = self.d
|
|
|
|
|
|
|
|
l = len(d)
|
|
|
|
k = d.keys()
|
|
|
|
s = d.stat()
|
|
|
|
f = d.fd()
|
|
|
|
|
|
|
|
if verbose:
|
2007-02-09 01:37:30 -04:00
|
|
|
print("length:", l)
|
|
|
|
print("keys:", k)
|
|
|
|
print("stats:", s)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
self.assertFalse(d.has_key(self.mk('bad key')))
|
|
|
|
self.assertTrue(d.has_key(self.mk('IA')), d.keys())
|
|
|
|
self.assertTrue(d.has_key(self.mk('OA')))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
d.delete(self.mk('IA'))
|
|
|
|
del d[self.mk('OA')]
|
|
|
|
self.assertFalse(d.has_key(self.mk('IA')))
|
|
|
|
self.assertFalse(d.has_key(self.mk('OA')))
|
2007-08-28 05:05:56 -03:00
|
|
|
self.assertEqual(len(d), l-2)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
values = []
|
|
|
|
for key in d.keys():
|
|
|
|
value = d[key]
|
|
|
|
values.append(value)
|
|
|
|
if verbose:
|
2007-02-09 01:37:30 -04:00
|
|
|
print("%s: %s" % (key, value))
|
2002-11-19 13:47:07 -04:00
|
|
|
self.checkrec(key, value)
|
|
|
|
|
2006-08-24 15:19:44 -03:00
|
|
|
dbvalues = sorted(d.values(), key=lambda x: (str(type(x)), x))
|
2007-08-28 05:05:56 -03:00
|
|
|
self.assertEqual(len(dbvalues), len(d.keys()))
|
2006-08-24 15:19:44 -03:00
|
|
|
values.sort(key=lambda x: (str(type(x)), x))
|
2007-08-28 05:05:56 -03:00
|
|
|
self.assertEqual(values, dbvalues, "%r != %r" % (values, dbvalues))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
items = d.items()
|
2007-08-28 05:05:56 -03:00
|
|
|
self.assertEqual(len(items), len(values))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
for key, value in items:
|
|
|
|
self.checkrec(key, value)
|
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
self.assertEqual(d.get(self.mk('bad key')), None)
|
|
|
|
self.assertEqual(d.get(self.mk('bad key'), None), None)
|
|
|
|
self.assertEqual(d.get(self.mk('bad key'), b'a string'), b'a string')
|
|
|
|
self.assertEqual(d.get(self.mk('bad key'), [1, 2, 3]), [1, 2, 3])
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
d.set_get_returns_none(0)
|
2007-10-12 16:13:19 -03:00
|
|
|
self.assertRaises(db.DBNotFoundError, d.get, self.mk('bad key'))
|
2002-11-19 13:47:07 -04:00
|
|
|
d.set_get_returns_none(1)
|
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
d.put(self.mk('new key'), b'new data')
|
|
|
|
self.assertEqual(d.get(self.mk('new key')), b'new data')
|
|
|
|
self.assertEqual(d[self.mk('new key')], b'new data')
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test02_cursors(self):
|
|
|
|
if verbose:
|
2007-02-09 01:37:30 -04:00
|
|
|
print('\n', '-=' * 30)
|
|
|
|
print("Running %s.test02_cursors..." % self.__class__.__name__)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
self.populateDB(self.d)
|
|
|
|
d = self.d
|
|
|
|
|
|
|
|
count = 0
|
|
|
|
c = d.cursor()
|
|
|
|
rec = c.first()
|
|
|
|
while rec is not None:
|
|
|
|
count = count + 1
|
|
|
|
if verbose:
|
2007-08-08 19:08:30 -03:00
|
|
|
print(repr(rec))
|
2002-11-19 13:47:07 -04:00
|
|
|
key, value = rec
|
|
|
|
self.checkrec(key, value)
|
|
|
|
rec = c.next()
|
2002-12-30 16:53:52 -04:00
|
|
|
del c
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-08-28 05:05:56 -03:00
|
|
|
self.assertEqual(count, len(d))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
count = 0
|
|
|
|
c = d.cursor()
|
|
|
|
rec = c.last()
|
|
|
|
while rec is not None:
|
|
|
|
count = count + 1
|
|
|
|
if verbose:
|
2007-02-09 01:37:30 -04:00
|
|
|
print(rec)
|
2002-11-19 13:47:07 -04:00
|
|
|
key, value = rec
|
|
|
|
self.checkrec(key, value)
|
|
|
|
rec = c.prev()
|
|
|
|
|
2007-08-28 05:05:56 -03:00
|
|
|
self.assertEqual(count, len(d))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
c.set(self.mk('SS'))
|
2002-11-19 13:47:07 -04:00
|
|
|
key, value = c.current()
|
|
|
|
self.checkrec(key, value)
|
2002-12-30 16:53:52 -04:00
|
|
|
del c
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-10-12 16:13:19 -03:00
|
|
|
def test03_append(self):
|
|
|
|
# NOTE: this is overridden in RECNO subclass, don't change its name.
|
|
|
|
if verbose:
|
|
|
|
print('\n', '-=' * 30)
|
|
|
|
print("Running %s.test03_append..." % self.__class__.__name__)
|
|
|
|
|
|
|
|
self.assertRaises(dbshelve.DBShelveError,
|
|
|
|
self.d.append, b'unit test was here')
|
|
|
|
|
|
|
|
|
2002-11-19 13:47:07 -04:00
|
|
|
def checkrec(self, key, value):
|
2007-10-12 16:13:19 -03:00
|
|
|
# override this in a subclass if the key type is different
|
2007-08-08 19:08:30 -03:00
|
|
|
x = key[1:]
|
|
|
|
if key[0:1] == b'S':
|
|
|
|
self.assertEquals(type(value), str)
|
|
|
|
self.assertEquals(value, 10 * x.decode("ascii"))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-08-08 19:08:30 -03:00
|
|
|
elif key[0:1] == b'I':
|
|
|
|
self.assertEquals(type(value), int)
|
|
|
|
self.assertEquals(value, ord(x))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-08-08 19:08:30 -03:00
|
|
|
elif key[0:1] == b'L':
|
|
|
|
self.assertEquals(type(value), list)
|
|
|
|
self.assertEquals(value, [x.decode("ascii")] * 10)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2007-08-08 19:08:30 -03:00
|
|
|
elif key[0:1] == b'O':
|
|
|
|
self.assertEquals(value.S, 10 * x.decode("ascii"))
|
|
|
|
self.assertEquals(value.I, ord(x))
|
|
|
|
self.assertEquals(value.L, [x.decode("ascii")] * 10)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
else:
|
2007-08-08 19:08:30 -03:00
|
|
|
self.fail('Unknown key type, fix the test')
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
class BasicShelveTestCase(DBShelveTestCase):
|
|
|
|
def do_open(self):
|
|
|
|
self.d = dbshelve.DBShelf()
|
|
|
|
self.d.open(self.filename, self.dbtype, self.dbflags)
|
|
|
|
|
|
|
|
def do_close(self):
|
|
|
|
self.d.close()
|
|
|
|
|
|
|
|
|
|
|
|
class BTreeShelveTestCase(BasicShelveTestCase):
|
|
|
|
dbtype = db.DB_BTREE
|
|
|
|
dbflags = db.DB_CREATE
|
|
|
|
|
|
|
|
|
|
|
|
class HashShelveTestCase(BasicShelveTestCase):
|
2002-11-23 07:26:07 -04:00
|
|
|
dbtype = db.DB_HASH
|
2002-11-19 13:47:07 -04:00
|
|
|
dbflags = db.DB_CREATE
|
|
|
|
|
|
|
|
|
|
|
|
class ThreadBTreeShelveTestCase(BasicShelveTestCase):
|
|
|
|
dbtype = db.DB_BTREE
|
|
|
|
dbflags = db.DB_CREATE | db.DB_THREAD
|
|
|
|
|
|
|
|
|
|
|
|
class ThreadHashShelveTestCase(BasicShelveTestCase):
|
2002-11-23 07:26:07 -04:00
|
|
|
dbtype = db.DB_HASH
|
2002-11-19 13:47:07 -04:00
|
|
|
dbflags = db.DB_CREATE | db.DB_THREAD
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
|
|
|
class BasicEnvShelveTestCase(DBShelveTestCase):
|
2007-08-28 05:05:56 -03:00
|
|
|
def setUp(self):
|
|
|
|
self.homeDir = tempfile.mkdtemp()
|
|
|
|
self.filename = 'dbshelve_db_file.db'
|
|
|
|
self.do_open()
|
|
|
|
|
2002-11-19 13:47:07 -04:00
|
|
|
def do_open(self):
|
2008-02-25 08:39:23 -04:00
|
|
|
self.homeDir = homeDir = os.path.join(
|
|
|
|
tempfile.gettempdir(), 'db_home%d'%os.getpid())
|
|
|
|
try: os.mkdir(homeDir)
|
|
|
|
except os.error: pass
|
2002-11-19 13:47:07 -04:00
|
|
|
self.env = db.DBEnv()
|
2007-08-28 05:05:56 -03:00
|
|
|
self.env.open(self.homeDir, self.envflags | db.DB_INIT_MPOOL | db.DB_CREATE)
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
self.d = dbshelve.DBShelf(self.env)
|
|
|
|
self.d.open(self.filename, self.dbtype, self.dbflags)
|
|
|
|
|
|
|
|
|
|
|
|
def do_close(self):
|
|
|
|
self.d.close()
|
|
|
|
self.env.close()
|
|
|
|
|
|
|
|
|
|
|
|
def tearDown(self):
|
2008-02-25 08:39:23 -04:00
|
|
|
test_support.rmtree(self.homeDir)
|
2002-11-19 13:47:07 -04:00
|
|
|
self.do_close()
|
|
|
|
|
|
|
|
|
|
|
|
class EnvBTreeShelveTestCase(BasicEnvShelveTestCase):
|
|
|
|
envflags = 0
|
|
|
|
dbtype = db.DB_BTREE
|
|
|
|
dbflags = db.DB_CREATE
|
|
|
|
|
|
|
|
|
|
|
|
class EnvHashShelveTestCase(BasicEnvShelveTestCase):
|
|
|
|
envflags = 0
|
2002-11-23 07:26:07 -04:00
|
|
|
dbtype = db.DB_HASH
|
2002-11-19 13:47:07 -04:00
|
|
|
dbflags = db.DB_CREATE
|
|
|
|
|
|
|
|
|
|
|
|
class EnvThreadBTreeShelveTestCase(BasicEnvShelveTestCase):
|
|
|
|
envflags = db.DB_THREAD
|
|
|
|
dbtype = db.DB_BTREE
|
|
|
|
dbflags = db.DB_CREATE | db.DB_THREAD
|
|
|
|
|
|
|
|
|
|
|
|
class EnvThreadHashShelveTestCase(BasicEnvShelveTestCase):
|
|
|
|
envflags = db.DB_THREAD
|
2002-11-23 07:26:07 -04:00
|
|
|
dbtype = db.DB_HASH
|
2002-11-19 13:47:07 -04:00
|
|
|
dbflags = db.DB_CREATE | db.DB_THREAD
|
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
2007-10-12 16:13:19 -03:00
|
|
|
# test cases for a DBShelf in a RECNO DB.
|
|
|
|
|
|
|
|
class RecNoShelveTestCase(BasicShelveTestCase):
|
|
|
|
dbtype = db.DB_RECNO
|
|
|
|
dbflags = db.DB_CREATE
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
BasicShelveTestCase.setUp(self)
|
|
|
|
|
|
|
|
# pool to assign integer key values out of
|
|
|
|
self.key_pool = list(range(1, 5000))
|
|
|
|
self.key_map = {} # map string keys to the number we gave them
|
|
|
|
self.intkey_map = {} # reverse map of above
|
|
|
|
|
|
|
|
def mk(self, key):
|
|
|
|
if key not in self.key_map:
|
|
|
|
self.key_map[key] = self.key_pool.pop(0)
|
|
|
|
self.intkey_map[self.key_map[key]] = key.encode('ascii')
|
|
|
|
return self.key_map[key]
|
|
|
|
|
|
|
|
def checkrec(self, intkey, value):
|
|
|
|
key = self.intkey_map[intkey]
|
|
|
|
BasicShelveTestCase.checkrec(self, key, value)
|
|
|
|
|
|
|
|
def test03_append(self):
|
|
|
|
if verbose:
|
|
|
|
print('\n', '-=' * 30)
|
|
|
|
print("Running %s.test03_append..." % self.__class__.__name__)
|
|
|
|
|
|
|
|
self.d[1] = b'spam'
|
|
|
|
self.d[5] = b'eggs'
|
|
|
|
self.assertEqual(6, self.d.append(b'spam'))
|
|
|
|
self.assertEqual(7, self.d.append(b'baked beans'))
|
|
|
|
self.assertEqual(b'spam', self.d.get(6))
|
|
|
|
self.assertEqual(b'spam', self.d.get(1))
|
|
|
|
self.assertEqual(b'baked beans', self.d.get(7))
|
|
|
|
self.assertEqual(b'eggs', self.d.get(5))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------
|
|
|
|
|
2002-12-30 16:53:52 -04:00
|
|
|
def test_suite():
|
|
|
|
suite = unittest.TestSuite()
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2002-12-30 16:53:52 -04:00
|
|
|
suite.addTest(unittest.makeSuite(DBShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(BTreeShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(HashShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(ThreadBTreeShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(ThreadHashShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(EnvBTreeShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(EnvHashShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(EnvThreadBTreeShelveTestCase))
|
|
|
|
suite.addTest(unittest.makeSuite(EnvThreadHashShelveTestCase))
|
2007-10-12 16:13:19 -03:00
|
|
|
suite.addTest(unittest.makeSuite(RecNoShelveTestCase))
|
2002-11-19 13:47:07 -04:00
|
|
|
|
2002-12-30 16:53:52 -04:00
|
|
|
return suite
|
2002-11-19 13:47:07 -04:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2002-12-30 16:53:52 -04:00
|
|
|
unittest.main(defaultTest='test_suite')
|