[Checkins] SVN: zope.testrunner/trunk/s With a big arsenal of tricks, I got that test passing in Py3 too.

Lennart Regebro regebro at gmail.com
Thu Apr 29 05:52:27 EDT 2010


Log message for revision 111566:
  With a big arsenal of tricks, I got that test passing in Py3 too.

Changed:
  U   zope.testrunner/trunk/setup.py
  U   zope.testrunner/trunk/src/zope/testrunner/find.py

-=-
Modified: zope.testrunner/trunk/setup.py
===================================================================
--- zope.testrunner/trunk/setup.py	2010-04-29 09:49:41 UTC (rev 111565)
+++ zope.testrunner/trunk/setup.py	2010-04-29 09:52:27 UTC (rev 111566)
@@ -60,6 +60,7 @@
                      'src/zope/testrunner/testrunner-ex/sampletestsl.txt',
                      'src/zope/testrunner/testrunner-ex/unicode.txt',
                      ],
+                 # Needed until Python 3 versions of all dependencies are released on PyPI:
                  dependency_links = ['.'],
                  )
 else:

Modified: zope.testrunner/trunk/src/zope/testrunner/find.py
===================================================================
--- zope.testrunner/trunk/src/zope/testrunner/find.py	2010-04-29 09:49:41 UTC (rev 111565)
+++ zope.testrunner/trunk/src/zope/testrunner/find.py	2010-04-29 09:52:27 UTC (rev 111566)
@@ -69,12 +69,25 @@
     postmortem debugger to indicate that debugging is finished and the
     test run should be terminated:
     
-    >>> try:
+    >>> from zope.testrunner.interfaces import EndRun
+    >>> try: #doctest: +ELLIPSIS
+    ...     print "Result:" # Needed to prevent the result from starting with '...'
     ...     StartUpFailure(options, None, exc_info)
+    ... except EndRun:
+    ...     print "EndRun raised"
     ... finally:
     ...    sys.stdin = old_stdin
-    Traceback (most recent call last):
-    EndRun
+    Result:
+    ...Exception:
+    <BLANKLINE>
+    ...
+    (Pdb) c
+    <BLANKLINE>
+    **********************************************************************
+    Can't use pdb.set_trace when running a layer as a subprocess!
+    **********************************************************************
+    <BLANKLINE>
+    EndRun raised
 
     Annoyingly, sometimes StartupFailures occur when postmortem debugging
     is enabled but no exc_info is passed. In this case, we raise a



More information about the checkins mailing list