Mercurial > p > roundup > code
comparison test/test_bsddb3.py @ 1873:f63aa57386b0
Backend improvements.
- using Zope3's test runner now, allowing GC checks, nicer controls and
coverage analysis
- all RDMBS backends now have indexes on several columns
- added testing of schema mutation, fixed rdbms backends handling of a
couple of cases
- !BETA! added postgresql backend, needs work !BETA!
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sat, 25 Oct 2003 22:53:26 +0000 |
| parents | |
| children | f9316d2cd5ba |
comparison
equal
deleted
inserted
replaced
| 1872:c085b4f4f0c0 | 1873:f63aa57386b0 |
|---|---|
| 1 # | |
| 2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) | |
| 3 # This module is free software, and you may redistribute it and/or modify | |
| 4 # under the same terms as Python, so long as this copyright message and | |
| 5 # disclaimer are retained in their original form. | |
| 6 # | |
| 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR | |
| 8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING | |
| 9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE | |
| 10 # POSSIBILITY OF SUCH DAMAGE. | |
| 11 # | |
| 12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, | |
| 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | |
| 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" | |
| 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, | |
| 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. | |
| 17 # | |
| 18 # $Id: test_bsddb3.py,v 1.1 2003-10-25 22:53:26 richard Exp $ | |
| 19 | |
| 20 import unittest, os, shutil, time | |
| 21 | |
| 22 from db_test_base import DBTest, ROTest, SchemaTest, \ | |
| 23 ClassicInitTest | |
| 24 from roundup import backends | |
| 25 | |
| 26 class bsddb3Opener: | |
| 27 if hasattr(backends, 'bsddb3'): | |
| 28 from roundup.backends import bsddb3 as module | |
| 29 | |
| 30 class bsddb3DBTest(bsddb3Opener, DBTest): | |
| 31 pass | |
| 32 | |
| 33 class bsddb3ROTest(bsddb3Opener, ROTest): | |
| 34 pass | |
| 35 | |
| 36 class bsddb3SchemaTest(bsddb3Opener, SchemaTest): | |
| 37 pass | |
| 38 | |
| 39 class bsddb3ClassicInitTest(ClassicInitTest): | |
| 40 backend = 'bsddb3' | |
| 41 | |
| 42 def test_suite(): | |
| 43 suite = unittest.TestSuite() | |
| 44 if not hasattr(backends, 'bsddb3'): | |
| 45 print 'Skipping bsddb3 tests' | |
| 46 return suite | |
| 47 print 'Including bsddb3 tests' | |
| 48 suite.addTest(unittest.makeSuite(bsddb3DBTest)) | |
| 49 suite.addTest(unittest.makeSuite(bsddb3ROTest)) | |
| 50 suite.addTest(unittest.makeSuite(bsddb3SchemaTest)) | |
| 51 suite.addTest(unittest.makeSuite(bsddb3ClassicInitTest)) | |
| 52 return suite | |
| 53 | |
| 54 if __name__ == '__main__': | |
| 55 runner = unittest.TextTestRunner() | |
| 56 unittest.main(testRunner=runner) | |
| 57 |
