[Zodb-checkins] CVS: StandaloneZODB/Tools/tests - testzeopack.py:1.5
Jeremy Hylton
jeremy@zope.com
Wed, 30 Jan 2002 16:42:33 -0500
Update of /cvs-repository/StandaloneZODB/Tools/tests
In directory cvs.zope.org:/tmp/cvs-serv13875/tests
Modified Files:
testzeopack.py
Log Message:
Add test of zeopack to non-existent server.
=== StandaloneZODB/Tools/tests/testzeopack.py 1.4 => 1.5 ===
class PackerTests(StorageTestBase):
+ def setUp(self):
+ self.started = 0
+
def start(self):
+ self.started =1
self.path = tempfile.mktemp(suffix=".fs")
self._storage = FileStorage(self.path)
self.db = ZODB.DB(self._storage)
@@ -31,6 +35,8 @@
self._dostore()
def tearDown(self):
+ if not self.started:
+ return
self.db.close()
self._storage.close()
self.exit.close()
@@ -76,6 +82,10 @@
status = os.system("zeopack.py -U %s" % self.addr)
assert status == 0
assert os.path.exists(self.path + ".old")
+
+ def testNoServer(self):
+ status = os.system("zeopack.py -p 19")
+ assert status != 0
class UpTest(unittest.TestCase):