diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/NEWS subunit-0.0.8+bzr177~ppa125~precise1/NEWS --- subunit-0.0.8+bzr176~ppa126~precise1/NEWS 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/NEWS 2012-12-17 07:38:14.000000000 +0000 @@ -11,6 +11,10 @@ * ``python/subunit/tests/test_run.py`` and ``python/subunit/filters.py`` were not included in the 0.0.8 tarball. (Robert Collins) +* The ``failfast`` option to ``subunit.run`` will now work. The dependency on + testtools has been raised to 0.9.23 to permit this. + (Robert Collins, #1090582) + 0.0.8 ----- diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/debian/bzr-builder.manifest subunit-0.0.8+bzr177~ppa125~precise1/debian/bzr-builder.manifest --- subunit-0.0.8+bzr176~ppa126~precise1/debian/bzr-builder.manifest 2012-05-23 13:54:38.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/debian/bzr-builder.manifest 2012-12-17 07:38:16.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.2 deb-version {debupstream-base}bzr176~ppa126 -lp:subunit revid:robertc@robertcollins.net-20120510060922-i7guebv9lzsubkk1 -merge packaging lp:~jelmer/subunit/vcs-debian revid:jelmer@debian.org-20120522205224-7cazh7cmdedqedtu +# bzr-builder format 0.2 deb-version {debupstream-base}bzr177~ppa125 +lp:subunit revid:robertc@robertcollins.net-20121217072428-88prtw6wnr1vzpq4 +merge packaging lp:~vcs-imports/subunit/vcs-debian revid:jelmer@samba.org-20121105212203-b0lv9o97d71arizv diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/debian/changelog subunit-0.0.8+bzr177~ppa125~precise1/debian/changelog --- subunit-0.0.8+bzr176~ppa126~precise1/debian/changelog 2012-05-23 13:54:38.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/debian/changelog 2012-12-17 07:38:16.000000000 +0000 @@ -1,12 +1,14 @@ -subunit (0.0.8+bzr176~ppa126~precise1) UNRELEASED; urgency=low +subunit (0.0.8+bzr177~ppa125~precise1) precise; urgency=low * Auto build. - -- Launchpad Package Builder Wed, 23 May 2012 13:54:38 +0000 + -- Launchpad Package Builder Mon, 17 Dec 2012 07:38:16 +0000 -subunit (0.0.8+bzr176-1) UNRELEASED; urgency=low +subunit (0.0.8+bzr176-1) unstable; urgency=low * New upstream snapshot. + * Fix dependencies for python3-subunit to depend on python3 rather than + python2. Closes: #674225 -- Jelmer Vernooij Tue, 22 May 2012 10:42:37 +0200 diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/debian/control subunit-0.0.8+bzr177~ppa125~precise1/debian/control --- subunit-0.0.8+bzr176~ppa126~precise1/debian/control 2012-05-23 13:54:37.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/debian/control 2012-12-17 07:38:15.000000000 +0000 @@ -64,9 +64,9 @@ Package: python3-subunit Architecture: all -Provides: ${python:Provides} -Depends: ${python:Depends}, ${misc:Depends}, - python-testtools (>= 0.9.4) +Provides: ${python3:Provides} +Depends: ${python3:Depends}, ${misc:Depends}, + python3-testtools (>= 0.9.4) Section: python Description: unit testing protocol - Python3 bindings to generate and consume streams subunit is a protocol for test activity serialisation deserialisation. This diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/__init__.py subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/__init__.py --- subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/__init__.py 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/__init__.py 2012-12-17 07:38:14.000000000 +0000 @@ -636,6 +636,8 @@ to subunit.Content objects. """ self._addOutcome("error", test, error=error, details=details) + if self.failfast: + self.stop() def addExpectedFailure(self, test, error=None, details=None): """Report an expected failure in test test. @@ -666,6 +668,8 @@ to subunit.Content objects. """ self._addOutcome("failure", test, error=error, details=details) + if self.failfast: + self.stop() def _addOutcome(self, outcome, test, error=None, details=None, error_permitted=True): @@ -730,6 +734,8 @@ """ self._addOutcome("uxsuccess", test, details=details, error_permitted=False) + if self.failfast: + self.stop() def startTest(self, test): """Mark a test as starting its test run.""" diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/run.py subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/run.py --- subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/run.py 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/run.py 2012-12-17 07:38:14.000000000 +0000 @@ -34,13 +34,22 @@ class SubunitTestRunner(object): - def __init__(self, stream=sys.stdout): - self.stream = stream + def __init__(self, verbosity=None, failfast=None, buffer=None, stream=None): + """Create a TestToolsTestRunner. + + :param verbosity: Ignored. + :param failfast: Stop running tests at the first failure. + :param buffer: Ignored. + """ + self.failfast = failfast + self.stream = stream or sys.stdout def run(self, test): "Run the given test case or test suite." result = TestProtocolClient(self.stream) result = AutoTimingTestResultDecorator(result) + if self.failfast is not None: + result.failfast = self.failfast test(result) return result @@ -70,6 +79,6 @@ if __name__ == '__main__': stream = get_default_formatter() - runner = SubunitTestRunner(stream) + runner = SubunitTestRunner SubunitTestProgram(module=None, argv=sys.argv, testRunner=runner, stdout=sys.stdout) diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/test_results.py subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/test_results.py --- subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/test_results.py 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/test_results.py 2012-12-17 07:38:14.000000000 +0000 @@ -78,6 +78,13 @@ def addUnexpectedSuccess(self, test, details=None): return self.decorated.addUnexpectedSuccess(test, details=details) + def _get_failfast(self): + return getattr(self.decorated, 'failfast', False) + + def _set_failfast(self, value): + self.decorated.failfast = value + failfast = property(_get_failfast, _set_failfast) + def progress(self, offset, whence): return self.decorated.progress(offset, whence) diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/tests/test_test_results.py subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/tests/test_test_results.py --- subunit-0.0.8+bzr176~ppa126~precise1/python/subunit/tests/test_test_results.py 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/python/subunit/tests/test_test_results.py 2012-12-17 07:38:14.000000000 +0000 @@ -61,6 +61,7 @@ def __init__(self): super(TimeCapturingResult, self).__init__() self._calls = [] + self.failfast = False def time(self, a_datetime): self._calls.append(a_datetime) @@ -198,6 +199,11 @@ self.assertEqual(3, len(self.decorated._calls)) self.assertNotEqual(None, self.decorated._calls[2]) + def test_set_failfast_True(self): + self.assertFalse(self.decorated.failfast) + self.result.failfast = True + self.assertTrue(self.decorated.failfast) + class TestTagCollapsingDecorator(TestCase): diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/runtests.py subunit-0.0.8+bzr177~ppa125~precise1/runtests.py --- subunit-0.0.8+bzr176~ppa126~precise1/runtests.py 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/runtests.py 2012-12-17 07:38:14.000000000 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # -*- Mode: python -*- # # Copyright (C) 2004 Canonical.com diff -Nru subunit-0.0.8+bzr176~ppa126~precise1/setup.py subunit-0.0.8+bzr177~ppa125~precise1/setup.py --- subunit-0.0.8+bzr176~ppa126~precise1/setup.py 2012-05-23 13:54:35.000000000 +0000 +++ subunit-0.0.8+bzr177~ppa125~precise1/setup.py 2012-12-17 07:38:14.000000000 +0000 @@ -9,7 +9,7 @@ else: extra = { 'install_requires': [ - 'testtools>=0.9.11', + 'testtools>=0.9.23', ] } @@ -38,6 +38,7 @@ long_description=open('README').read(), classifiers=[ 'Intended Audience :: Developers', + 'Programming Language :: Python :: 3', 'Programming Language :: Python', 'Topic :: Software Development :: Testing', ],