[svn-commits] mmichelson: branch mmichelson/bridge-tests r3301 - /asterisk/team/mmichelson/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Jul 8 21:36:31 CDT 2012


Author: mmichelson
Date: Sun Jul  8 21:36:25 2012
New Revision: 3301

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3301
Log:
Fix problem where TestRunner tests could not pass.

The default value for self.passed for TestCase has
been updated to "None" instead of "False". The set_passed
method has been updated to refuse to set self.passed only
if self.passed is currently False.

This makes it so that tests can properly update the value
to True but impossible to change it from False.

This is still compatible with the multitude of tests that
rely on self.passed to not be True on startup, and testing
with 'if not passed' still will result in failure if an
explicit True value is not set.


Modified:
    asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestCase.py

Modified: asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestCase.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestCase.py?view=diff&rev=3301&r1=3300&r2=3301
==============================================================================
--- asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestCase.py (original)
+++ asterisk/team/mmichelson/bridge-tests/lib/python/asterisk/TestCase.py Sun Jul  8 21:36:25 2012
@@ -59,7 +59,7 @@
         self.ami = []
         self.fastagi = []
         self.reactor_timeout = 30
-        self.passed = False
+        self.passed = None
         self.defaultLogLevel = "WARN"
         self.defaultLogFileName = "logger.conf"
         self.timeoutId = None
@@ -473,6 +473,6 @@
         '''Accumulate pass/fail value. If a test module has already
         claimed that the test has failed, then this method will ignore
         any further attempts to change the pass/fail status.'''
-        if not self.passed:
+        if self.passed == False:
             return
         self.passed = value




More information about the svn-commits mailing list