[Zope3-checkins] CVS: Zope3/src/zodb/storage/tests - test_autopack.py:1.1.2.2 test_create.py:1.1.2.3 test_storage_api.py:1.1.2.4 test_virgin.py:1.1.2.2 test_whitebox.py:1.1.2.2 test_zodb_simple.py:1.1.2.2
Barry Warsaw
barry@wooz.org
Tue, 24 Dec 2002 11:20:35 -0500
Update of /cvs-repository/Zope3/src/zodb/storage/tests
In directory cvs.zope.org:/tmp/cvs-serv3411/src/zodb/storage/tests
Modified Files:
Tag: NameGeddon-branch
test_autopack.py test_create.py test_storage_api.py
test_virgin.py test_whitebox.py test_zodb_simple.py
Log Message:
Wrap imports of bsddb3 in try/excepts and raise RuntimeErrors if its
missing, which the test.py script will catch and ignore.
=== Zope3/src/zodb/storage/tests/test_autopack.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_autopack.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_autopack.py Tue Dec 24 11:20:34 2002
@@ -12,6 +12,11 @@
#
##############################################################################
+try:
+ import bsddb3
+except ImportError:
+ raise RuntimeError, 'BerkeleyDB not available'
+
import os
import time
import unittest
=== Zope3/src/zodb/storage/tests/test_create.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zodb/storage/tests/test_create.py:1.1.2.2 Mon Dec 23 17:35:37 2002
+++ Zope3/src/zodb/storage/tests/test_create.py Tue Dec 24 11:20:34 2002
@@ -12,6 +12,11 @@
#
##############################################################################
+try:
+ import bsddb3
+except ImportError:
+ raise RuntimeError, 'BerkeleyDB not available'
+
# Unit test for database creation
import os
=== Zope3/src/zodb/storage/tests/test_storage_api.py 1.1.2.3 => 1.1.2.4 ===
--- Zope3/src/zodb/storage/tests/test_storage_api.py:1.1.2.3 Mon Dec 23 17:18:09 2002
+++ Zope3/src/zodb/storage/tests/test_storage_api.py Tue Dec 24 11:20:34 2002
@@ -12,13 +12,14 @@
#
##############################################################################
+try:
+ import bsddb3
+except ImportError:
+ raise RuntimeError, 'BerkeleyDB not available'
+
# Unit tests for basic storage functionality
import unittest
-# Import this here and now so that import failures properly cause the test
-# suite to ignore these tests.
-import bsddb3
-
from zodb import interfaces
from zodb.storage.tests import base
=== Zope3/src/zodb/storage/tests/test_virgin.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_virgin.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_virgin.py Tue Dec 24 11:20:34 2002
@@ -14,6 +14,11 @@
# Test creation of a brand new database, and insertion of root objects.
+try:
+ import bsddb3
+except ImportError:
+ raise RuntimeError, 'BerkeleyDB not available'
+
import unittest
from zodb.storage.tests.base import ZODBTestBase
=== Zope3/src/zodb/storage/tests/test_whitebox.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_whitebox.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_whitebox.py Tue Dec 24 11:20:34 2002
@@ -14,6 +14,11 @@
# Whitebox testing of storage implementation details.
+try:
+ import bsddb3
+except ImportError:
+ raise RuntimeError, 'BerkeleyDB not available'
+
import unittest
from zodb.storage.tests.minpo import MinPO
=== Zope3/src/zodb/storage/tests/test_zodb_simple.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zodb/storage/tests/test_zodb_simple.py:1.1.2.1 Mon Dec 23 14:30:50 2002
+++ Zope3/src/zodb/storage/tests/test_zodb_simple.py Tue Dec 24 11:20:34 2002
@@ -12,6 +12,11 @@
#
##############################################################################
+try:
+ import bsddb3
+except ImportError:
+ raise RuntimeError, 'BerkeleyDB not available'
+
# Test some simple ZODB level stuff common to both the Minimal and Full
# storages, like transaction aborts and commits, changing objects, etc.
# Doesn't test undo, versions, or packing.