X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=test%2F__init__.py;h=5273971e40a6667ea5b577ed78442c5f73dd9e67;hb=47cde0d6fb759784f9f122430c35727f752a727d;hp=7e841b3f0eb59b508fd50206623ba29342e7882c;hpb=efe03825ec770b4c20f5264e30a705b22e73267a;p=roundup.git diff --git a/test/__init__.py b/test/__init__.py index 7e841b3..5273971 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,29 +1,41 @@ -# $Id: __init__.py,v 1.3 2001-07-29 07:01:39 richard Exp $ +# +# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) +# This module is free software, and you may redistribute it and/or modify +# under the same terms as Python, so long as this copyright message and +# disclaimer are retained in their original form. +# +# IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR +# DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING +# OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +# BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" +# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, +# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +# +# $Id: __init__.py,v 1.18 2002-09-10 00:19:54 richard Exp $ -import unittest +import os, tempfile, unittest, shutil +import roundup.roundupdb +roundup.roundupdb.SENDMAILDEBUG=os.environ['SENDMAILDEBUG']=tempfile.mktemp() -import test_dates, test_schema, test_db, test_multipart +# figure all the modules available +dir = os.path.split(__file__)[0] +test_mods = {} +for file in os.listdir(dir): + if file.startswith('test_') and file.endswith('.py'): + name = file[5:-3] + test_mods[name] = __import__(file[:-3], globals(), locals(), []) +all_tests = test_mods.keys() -def go(): - suite = unittest.TestSuite(( - test_dates.suite(), - test_schema.suite(), - test_db.suite(), - test_multipart.suite(), - )) +def go(tests=all_tests): + l = [] + for name in tests: + l.append(test_mods[name].suite()) + suite = unittest.TestSuite(l) runner = unittest.TextTestRunner() runner.run(suite) -# -# $Log: not supported by cvs2svn $ -# Revision 1.2 2001/07/28 06:43:02 richard -# Multipart message class has the getPart method now. Added some tests for it. -# -# Revision 1.1 2001/07/27 06:55:07 richard -# moving tests -> test -# -# Revision 1.3 2001/07/25 04:34:31 richard -# Added id and log to tests files... -# -# # vim: set filetype=python ts=4 sw=4 et si