Mercurial > p > roundup > code
comparison test/test_anydbm.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_anydbm.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, ClassicInitTest | |
| 23 | |
| 24 class anydbmOpener: | |
| 25 from roundup.backends import anydbm as module | |
| 26 | |
| 27 class anydbmDBTest(anydbmOpener, DBTest): | |
| 28 pass | |
| 29 | |
| 30 class anydbmROTest(anydbmOpener, ROTest): | |
| 31 pass | |
| 32 | |
| 33 class anydbmSchemaTest(anydbmOpener, SchemaTest): | |
| 34 pass | |
| 35 | |
| 36 class anydbmClassicInitTest(ClassicInitTest): | |
| 37 backend = 'anydbm' | |
| 38 | |
| 39 def test_suite(): | |
| 40 suite = unittest.TestSuite() | |
| 41 print 'Including anydbm tests' | |
| 42 suite.addTest(unittest.makeSuite(anydbmDBTest)) | |
| 43 suite.addTest(unittest.makeSuite(anydbmROTest)) | |
| 44 suite.addTest(unittest.makeSuite(anydbmSchemaTest)) | |
| 45 suite.addTest(unittest.makeSuite(anydbmClassicInitTest)) | |
| 46 return suite | |
| 47 | |
| 48 if __name__ == '__main__': | |
| 49 runner = unittest.TextTestRunner() | |
| 50 unittest.main(testRunner=runner) | |
| 51 | |
| 52 | |
| 53 # vim: set filetype=python ts=4 sw=4 et si |
