Mercurial > p > roundup > code
annotate test/__init__.py @ 1635:b0ffb474716e
nicer index navigation
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 09 May 2003 03:43:22 +0000 |
| parents | 9b910e8d987d |
| children | c1eec970d5c0 |
| rev | line source |
|---|---|
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
1 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
2 # Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/) |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
3 # This module is free software, and you may redistribute it and/or modify |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
4 # under the same terms as Python, so long as this copyright message and |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
5 # disclaimer are retained in their original form. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
6 # |
| 214 | 7 # IN NO EVENT SHALL BIZAR SOFTWARE PTY LTD BE LIABLE TO ANY PARTY FOR |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
8 # DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
9 # OUT OF THE USE OF THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
10 # POSSIBILITY OF SUCH DAMAGE. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
11 # |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
12 # BIZAR SOFTWARE PTY LTD SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
17 # |
| 1090 | 18 # $Id: __init__.py,v 1.18 2002-09-10 00:19:54 richard Exp $ |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
613
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
20 import os, tempfile, unittest, shutil |
|
753
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
613
diff
changeset
|
21 import roundup.roundupdb |
|
938edfdeac6e
Sorry about this huge checkin!
Richard Jones <richard@users.sourceforge.net>
parents:
613
diff
changeset
|
22 roundup.roundupdb.SENDMAILDEBUG=os.environ['SENDMAILDEBUG']=tempfile.mktemp() |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 |
|
613
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
24 # figure all the modules available |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
25 dir = os.path.split(__file__)[0] |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
26 test_mods = {} |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
27 for file in os.listdir(dir): |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
28 if file.startswith('test_') and file.endswith('.py'): |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
29 name = file[5:-3] |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
30 test_mods[name] = __import__(file[:-3], globals(), locals(), []) |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
31 all_tests = test_mods.keys() |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
32 |
|
613
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
33 def go(tests=all_tests): |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
34 l = [] |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
35 for name in tests: |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
36 l.append(test_mods[name].suite()) |
|
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
37 suite = unittest.TestSuite(l) |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
38 runner = unittest.TextTestRunner() |
|
613
d77b82588bf0
Fixed the unit tests for the mailgw re: the x-roundup-name header.
Richard Jones <richard@users.sourceforge.net>
parents:
564
diff
changeset
|
39 runner.run(suite) |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
40 |
|
127
0791d13baea7
Added vim command to all source so that we don't get no steenkin' tabs :)
Richard Jones <richard@users.sourceforge.net>
parents:
110
diff
changeset
|
41 # vim: set filetype=python ts=4 sw=4 et si |
