[Spambayes-checkins] spambayes/Outlook2000 msgstore.py,1.81,1.82

Mark Hammond mhammond at users.sourceforge.net
Fri Dec 19 01:25:17 EST 2003


Update of /cvsroot/spambayes/spambayes/Outlook2000
In directory sc8-pr-cvs1:/tmp/cvs-serv8630

Modified Files:
	msgstore.py 
Log Message:
Allow the test suite to raise an error only a certain number of times.


Index: msgstore.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Outlook2000/msgstore.py,v
retrieving revision 1.81
retrieving revision 1.82
diff -C2 -d -r1.81 -r1.82
*** msgstore.py	19 Dec 2003 02:20:53 -0000	1.81
--- msgstore.py	19 Dec 2003 06:25:15 -0000	1.82
***************
*** 48,55 ****
--- 48,62 ----
  test_suite_failure_request = None
  test_suite_failure = None
+ # Set to the number of times we should fail, or None for all times.
+ test_suite_failure_count = None 
  # Sometimes the test suite will request that we simulate MAPI errors.
  def help_test_suite(checkpoint_name):
+     global test_suite_failure_request, test_suite_failure_count
      if test_suite_running and \
         test_suite_failure_request == checkpoint_name:
+         if test_suite_failure_count:
+             test_suite_failure_count -= 1
+             if test_suite_failure_count==0:
+                 test_suite_failure_request = None
          raise test_suite_failure[0], test_suite_failure[1]
  





More information about the Spambayes-checkins mailing list