Mercurial > p > roundup > code
annotate test/__init__.py @ 522:f2edf460b0b9
[SF#502437] rogue reactor and unittest
in short, the nosy reactor was modifying the nosy list. That code had
been there for a long time, and I suspect it was there because we
weren't generating the nosy list correctly in other places of the code.
We're now doing that, so the nosy-modifying code can go away from the
nosy reactor.
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 11 Jan 2002 23:22:29 +0000 |
| parents | a090b3873d82 |
| children | dce4c75bef5a |
| 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 # |
|
483
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
18 # $Id: __init__.py,v 1.10 2002-01-05 02:09:46 richard Exp $ |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
20 import unittest |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
21 import os, tempfile |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
22 os.environ['SENDMAILDEBUG'] = tempfile.mktemp() |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
23 |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
24 import test_dates, test_schema, test_db, test_multipart, test_mailsplit |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
25 import test_init, test_token, test_mailgw |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
26 |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
27 def go(): |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
28 suite = unittest.TestSuite(( |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
29 test_dates.suite(), |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
30 test_schema.suite(), |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
31 test_db.suite(), |
|
205
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
32 test_init.suite(), |
|
110
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
33 test_multipart.suite(), |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
34 test_mailsplit.suite(), |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
35 test_mailgw.suite(), |
|
470
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
36 test_token.suite(), |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
37 )) |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
38 runner = unittest.TextTestRunner() |
|
483
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
39 result = runner.run(suite) |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
40 return result.wasSuccessful() |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
41 |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
42 # |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
43 # $Log: not supported by cvs2svn $ |
|
483
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
44 # Revision 1.9 2002/01/02 02:31:38 richard |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
45 # Sorry for the huge checkin message - I was only intending to implement #496356 |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
46 # but I found a number of places where things had been broken by transactions: |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
47 # . modified ROUNDUPDBSENDMAILDEBUG to be SENDMAILDEBUG and hold a filename |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
48 # for _all_ roundup-generated smtp messages to be sent to. |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
49 # . the transaction cache had broken the roundupdb.Class set() reactors |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
50 # . newly-created author users in the mailgw weren't being committed to the db |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
51 # |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
52 # Stuff that made it into CHANGES.txt (ie. the stuff I was actually working |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
53 # on when I found that stuff :): |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
54 # . #496356 ] Use threading in messages |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
55 # . detectors were being registered multiple times |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
56 # . added tests for mailgw |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
57 # . much better attaching of erroneous messages in the mail gateway |
|
a090b3873d82
make setup abort if tests fail
Richard Jones <richard@users.sourceforge.net>
parents:
475
diff
changeset
|
58 # |
|
475
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
59 # Revision 1.8 2001/12/31 05:09:20 richard |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
60 # Added better tokenising to roundup-admin - handles spaces and stuff. Can |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
61 # use quoting or backslashes. See the roundup.token pydoc. |
|
a1a44636bace
Fix breakage caused by transaction changes.
Richard Jones <richard@users.sourceforge.net>
parents:
470
diff
changeset
|
62 # |
|
470
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
63 # Revision 1.7 2001/08/07 00:24:43 richard |
|
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
64 # stupid typo |
|
9f7320624bc2
Added better tokenising to roundup-admin - handles spaces and stuff.
Richard Jones <richard@users.sourceforge.net>
parents:
214
diff
changeset
|
65 # |
| 214 | 66 # Revision 1.6 2001/08/07 00:15:51 richard |
| 67 # Added the copyright/license notice to (nearly) all files at request of | |
| 68 # Bizar Software. | |
| 69 # | |
|
213
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
70 # Revision 1.5 2001/08/05 07:45:27 richard |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
71 # Added tests for instance initialisation |
|
d45384bc6420
Added the copyright/license notice to (nearly) all files...
Richard Jones <richard@users.sourceforge.net>
parents:
205
diff
changeset
|
72 # |
|
205
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
73 # Revision 1.4 2001/08/03 07:18:22 richard |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
74 # Implemented correct mail splitting (was taking a shortcut). Added unit |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
75 # tests. Also snips signatures now too. |
|
da2e5d340e14
Added tests for instance initialisation
Richard Jones <richard@users.sourceforge.net>
parents:
198
diff
changeset
|
76 # |
|
198
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
77 # Revision 1.3 2001/07/29 07:01:39 richard |
|
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
78 # Added vim command to all source so that we don't get no steenkin' tabs :) |
|
eda506860b32
Implemented correct mail splitting (was taking a shortcut).
Richard Jones <richard@users.sourceforge.net>
parents:
127
diff
changeset
|
79 # |
|
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
|
80 # Revision 1.2 2001/07/28 06:43:02 richard |
|
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
|
81 # Multipart message class has the getPart method now. Added some tests for it. |
|
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
|
82 # |
|
110
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
83 # Revision 1.1 2001/07/27 06:55:07 richard |
|
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
84 # moving tests -> test |
|
19686b60e410
Multipart message class has the getPart method now. Added some tests for it.
Richard Jones <richard@users.sourceforge.net>
parents:
92
diff
changeset
|
85 # |
|
92
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
86 # Revision 1.3 2001/07/25 04:34:31 richard |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
87 # Added id and log to tests files... |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
88 # |
|
fa44da8d9df2
moving tests -> test
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
89 # |
|
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
|
90 # vim: set filetype=python ts=4 sw=4 et si |
