9 if 'verbose' in sys
.argv
:
11 sys
.argv
.remove('verbose')
13 if 'silent' in sys
.argv
: # take care of old flag, just in case
15 sys
.argv
.remove('silent')
23 # For earlier Pythons w/distutils pybsddb
27 print db
.DB_VERSION_STRING
28 print 'bsddb.db.version(): %s' % (db
.version(), )
29 print 'bsddb.db.__version__: %s' % db
.__version
__
30 print 'bsddb.db.cvsid: %s' % db
.cvsid
31 print 'python version: %s' % sys
.version
32 print 'My pid: %s' % os
.getpid()
36 class PrintInfoFakeTest(unittest
.TestCase
):
37 def testPrintVersions(self
):
41 # This little hack is for when this module is run as main and all the
42 # other modules import it so they will still be able to get the right
43 # verbose setting. It's confusing but it works.
45 test_all
.verbose
= verbose
66 alltests
= unittest
.TestSuite()
67 for name
in test_modules
:
68 module
= __import__(name
)
69 alltests
.addTest(module
.test_suite())
74 suite
= unittest
.TestSuite()
75 suite
.addTest(unittest
.makeSuite(PrintInfoFakeTest
))
79 if __name__
== '__main__':
81 unittest
.main(defaultTest
='suite')