[Zodb-checkins] CVS: Zope3/src/zodb/storage - base.py:1.33

Chris Withers chrisw at nipltd.com
Fri Sep 12 10:45:40 EDT 2003


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv9412/src/zodb/storage

Modified Files:
	base.py 
Log Message:
Add error output if tests aren't run when test.py --all is used. This doesn't feel graceful to me, but I can't think of anything better...
Alternative solutions welcome.

=== Zope3/src/zodb/storage/base.py 1.32 => 1.33 ===
--- Zope3/src/zodb/storage/base.py:1.32	Tue Jul 29 18:07:11 2003
+++ Zope3/src/zodb/storage/base.py	Fri Sep 12 10:45:33 2003
@@ -23,6 +23,7 @@
 import errno
 import shutil
 import struct
+import sys
 import threading
 import logging
 
@@ -36,6 +37,10 @@
     berkeley_is_available = True
 except ImportError:
     berkeley_is_available = False
+    # If we're supposed to be running all tests, output a warning
+    if os.environ.get("COMPLAIN_IF_TESTS_MISSED"):
+        sys.stderr.write("bsdbb not available, some tests disabled\n")        
+
     # But, MemoryStorage piggybacks on the implementation of BDBFullStorage so
     # create a fake db object that has some useful constants.
     class db:




More information about the Zodb-checkins mailing list