diff -Nru uci-tests-0.1.8/debian/bzr-builder.manifest uci-tests-0.1.9/debian/bzr-builder.manifest --- uci-tests-0.1.8/debian/bzr-builder.manifest 2015-07-03 16:07:34.000000000 +0000 +++ uci-tests-0.1.9/debian/bzr-builder.manifest 2015-07-10 16:14:59.000000000 +0000 @@ -1,2 +1,2 @@ -# bzr-builder format 0.3 deb-version {debupstream}-0~168 -lp:uci-tests revid:vila+qa@canonical.com-20150703160526-fdqn8pfii4cbg5ww +# bzr-builder format 0.3 deb-version {debupstream}-0~172 +lp:uci-tests revid:vila+qa@canonical.com-20150710161241-mmmyfire912drh3b diff -Nru uci-tests-0.1.8/debian/changelog uci-tests-0.1.9/debian/changelog --- uci-tests-0.1.8/debian/changelog 2015-07-03 16:07:34.000000000 +0000 +++ uci-tests-0.1.9/debian/changelog 2015-07-10 16:14:59.000000000 +0000 @@ -1,8 +1,18 @@ -uci-tests (0.1.8-0~168~ubuntu15.10.1) wily; urgency=low +uci-tests (0.1.9-0~172~ubuntu15.10.1) wily; urgency=low * Auto build. - -- Vincent Ladeuil Fri, 03 Jul 2015 16:07:34 +0000 + -- Vincent Ladeuil Fri, 10 Jul 2015 16:14:59 +0000 + +uci-tests (0.1.9) unstable; urgency=medium + + * Delay output from test results for consistency and allowing addError (and + friends) to be used more freely. + + * Fix pypi packaging issue by using python3 to create the sdist (otherwise + uci-run-tests is not included and pip install fails for the py3 version). + + -- Vincent Ladeuil Fri, 10 Jul 2015 18:02:35 +0200 uci-tests (0.1.8) unstable; urgency=medium diff -Nru uci-tests-0.1.8/NEWS.rst uci-tests-0.1.9/NEWS.rst --- uci-tests-0.1.8/NEWS.rst 2015-07-03 16:07:34.000000000 +0000 +++ uci-tests-0.1.9/NEWS.rst 2015-07-10 16:14:58.000000000 +0000 @@ -4,11 +4,24 @@ Overview of changes to uci-tests in reverse chronological order. +0.1.9 +===== + +* Delay output from test results for consistency and allowing addError (and + friends) to be used more freely. + +* Fix pypi packaging issue by using python3 to create the sdist (otherwise + uci-run-tests is not included and pip install fails for the py3 version). + As of today, pip install should also specify python-subunit==0.0.16 and + testtools==0.9.34. More recent versions are not supported (yet). + + 0.1.8 ===== * Fix subunit requirement in setup.py, the proper name is python-subunit. + 0.1.7 ===== @@ -24,7 +37,8 @@ * Add a TestSuite object implementing setUp() and addCleanUp() with semantics similar to unittest.TestCase but applied to suites. - + + 0.1.6 ===== @@ -38,12 +52,14 @@ * Add support for parametrized tests (ucitests.scenarii). + 0.1.4 ===== * Flush all output from the test result or feedback about which test is running is wrong. + 0.1.3 ===== @@ -53,6 +69,7 @@ * Add features.UbuntuPlatform for tests that requires specific Ubuntu Releases. + 0.1.2 ===== @@ -69,6 +86,7 @@ * TestPyflakes.excludes expect paths including the module name. + 0.0.9 ===== @@ -86,6 +104,7 @@ * provide a walker.Walker class that can filter a file system tree and call a handler for each file or directory. + 0.0.8 ===== @@ -95,6 +114,7 @@ * disable tests that requires recent versions for testtools, pep8 and pyflakes so most of the package can be dep8 tested on precise. + 0.0.7 ===== @@ -120,6 +140,7 @@ * make assertSuccessfullTest part of assertions.py. + 0.0.4 ===== diff -Nru uci-tests-0.1.8/PACKAGING.rst uci-tests-0.1.9/PACKAGING.rst --- uci-tests-0.1.8/PACKAGING.rst 2015-07-03 16:07:34.000000000 +0000 +++ uci-tests-0.1.9/PACKAGING.rst 2015-07-10 16:14:58.000000000 +0000 @@ -54,11 +54,11 @@ Create the tarball in the directory above, sign it and upload it. -$ python setup.py sdist -d .. upload --sign --show-response +$ python3 setup.py sdist -d .. upload --sign --show-response If the project is renamed, it needs to be registered: -$ python setup.py register +$ python3 setup.py register Opening next release for dev diff -Nru uci-tests-0.1.8/ucitests/__init__.py uci-tests-0.1.9/ucitests/__init__.py --- uci-tests-0.1.8/ucitests/__init__.py 2015-07-03 16:07:34.000000000 +0000 +++ uci-tests-0.1.9/ucitests/__init__.py 2015-07-10 16:14:58.000000000 +0000 @@ -19,4 +19,4 @@ # the release level is 'dev' or 'final'. The # version_info value corresponding to the ucitests version 2.0 is (2, 0, 0, # 'final', 0). -__version__ = (0, 1, 8, 'final', 0) +__version__ = (0, 1, 9, 'final', 0) diff -Nru uci-tests-0.1.8/ucitests/results.py uci-tests-0.1.9/ucitests/results.py --- uci-tests-0.1.8/ucitests/results.py 2015-07-03 16:07:34.000000000 +0000 +++ uci-tests-0.1.9/ucitests/results.py 2015-07-10 16:14:58.000000000 +0000 @@ -33,6 +33,11 @@ # -- vila 2014-01-28 super(TextResult, self).__init__(stream) self.verbose = verbosity > 1 + # Output is delayed until 'stopTest' is called. This ensures the output + # is produced from a single place at a precise point in time (they are + # cases where addError is called multiple times and delaying the output + # provides a more consistent behavior). + self.delayed_output = '' def startTest(self, test): if self.verbose: @@ -47,11 +52,13 @@ super(TextResult, self).startTest(test) def stopTest(self, test): + self.stream.write(self.delayed_output) + self.delayed_output = '' if self.verbose: elapsed_time = self._now() - self.start_time self.stream.write(' (%.3f secs)\n' % self._delta_to_float(elapsed_time)) - self.stream.flush() + self.stream.flush() super(TextResult, self).stopTest(test) def startTestRun(self): @@ -71,18 +78,16 @@ def addError(self, test, err=None, details=None): if self.verbose: - self.stream.write('ERROR') + self.delayed_output += 'ERROR' else: - self.stream.write('E') - self.stream.flush() + self.delayed_output += 'E' super(TextResult, self).addError(test, err, details) def addFailure(self, test, err=None, details=None): if self.verbose: - self.stream.write('FAIL') + self.delayed_output += 'FAIL' else: - self.stream.write('F') - self.stream.flush() + self.delayed_output += 'F' super(TextResult, self).addFailure(test, err, details) def addSkip(self, test, reason): @@ -91,32 +96,28 @@ reason_displayed = '' else: reason_displayed = ' ' + reason - self.stream.write('SKIP%s' % reason_displayed) + self.delayed_output += 'SKIP{}'.format(reason_displayed) else: - self.stream.write('s') - self.stream.flush() + self.delayed_output += 's' super(TextResult, self).addSkip(test, reason) def addSuccess(self, test, details=None): if self.verbose: - self.stream.write('OK') + self.delayed_output += 'OK' else: - self.stream.write('.') - self.stream.flush() + self.delayed_output += '.' super(TextResult, self).addSuccess(test, details) def addExpectedFailure(self, test, err=None): if self.verbose: - self.stream.write('XFAIL') + self.delayed_output += 'XFAIL' else: - self.stream.write('x') - self.stream.flush() + self.delayed_output += 'x' super(TextResult, self).addExpectedFailure(test, err) def addUnexpectedSuccess(self, test): if self.verbose: - self.stream.write('NOTOK') + self.delayed_output += 'NOTOK' else: - self.stream.write('u') - self.stream.flush() + self.delayed_output += 'u' super(TextResult, self).addUnexpectedSuccess(test)