[Checkins] SVN: zope.testrunner/trunk/ - Added back support for Python <= 2.6 which was broken in 4.0.2.
Michael Howitz
mh at gocept.com
Thu Mar 17 04:20:48 EDT 2011
Log message for revision 120991:
- Added back support for Python <= 2.6 which was broken in 4.0.2.
- Added missing change log entry of work Lennard Regebro has done
- Added Trove classifier telling Python 2.7 is supported as tests pass there.
Changed:
U zope.testrunner/trunk/CHANGES.txt
U zope.testrunner/trunk/setup.py
U zope.testrunner/trunk/src/zope/testrunner/runner.py
-=-
Modified: zope.testrunner/trunk/CHANGES.txt
===================================================================
--- zope.testrunner/trunk/CHANGES.txt 2011-03-17 07:46:59 UTC (rev 120990)
+++ zope.testrunner/trunk/CHANGES.txt 2011-03-17 08:20:48 UTC (rev 120991)
@@ -4,7 +4,7 @@
4.0.3 (unreleased)
==================
-- Nothing changed yet.
+- Added back support for Python <= 2.6 which was broken in 4.0.2.
4.0.2 (2011-03-16)
@@ -12,6 +12,8 @@
- Added back Python 3 support which was broken in 4.0.1.
+- Fixed `Unexpected success`_ support by implementing the whole concept.
+
- Added support for the new __pycache__ directories in Python 3.2.
Modified: zope.testrunner/trunk/setup.py
===================================================================
--- zope.testrunner/trunk/setup.py 2011-03-17 07:46:59 UTC (rev 120990)
+++ zope.testrunner/trunk/setup.py 2011-03-17 08:20:48 UTC (rev 120991)
@@ -81,9 +81,9 @@
'python-subunit',
]},
)
-
+
class custom_test(test):
# The zope.testrunner tests MUST be run using it's own testrunner. This is
# because it's subprocess testing will call the script it was run with. We
@@ -179,6 +179,7 @@
"Programming Language :: Python :: 2.4",
"Programming Language :: Python :: 2.5",
"Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.1",
"Topic :: Software Development :: Libraries :: Python Modules",
Modified: zope.testrunner/trunk/src/zope/testrunner/runner.py
===================================================================
--- zope.testrunner/trunk/src/zope/testrunner/runner.py 2011-03-17 07:46:59 UTC (rev 120990)
+++ zope.testrunner/trunk/src/zope/testrunner/runner.py 2011-03-17 08:20:48 UTC (rev 120991)
@@ -54,8 +54,8 @@
except ImportError:
class _UnexpectedSuccess(Exception):
pass
-
+
PYREFCOUNT_PATTERN = re.compile('\[[0-9]+ refs\]')
is_jython = sys.platform.startswith('java')
@@ -322,7 +322,10 @@
t = time.time() - t
output.stop_tests()
failures.extend(result.failures)
- failures.extend(result.unexpectedSuccesses)
+ if hasattr(result, 'unexpectedSuccesses'):
+ # Python versions prior to 2.7 do not have the concept of
+ # unexpectedSuccesses.
+ failures.extend(result.unexpectedSuccesses)
errors.extend(result.errors)
output.summary(result.testsRun, len(failures),
len(result.errors), t)
@@ -771,7 +774,7 @@
unittest.TestResult.addExpectedFailure(self, test, exc_info)
def addUnexpectedSuccess(self, test):
- self.options.output.test_error(test, time.time() - self._start_time,
+ self.options.output.test_error(test, time.time() - self._start_time,
(_UnexpectedSuccess, None, None))
unittest.TestResult.addUnexpectedSuccess(self, test)
@@ -785,7 +788,7 @@
zope.testrunner.debug.post_mortem(exc_info)
elif self.options.stop_on_error:
self.stop()
-
+
def stopTest(self, test):
self.testTearDown()
self.options.output.stop_test(test)
More information about the checkins
mailing list