Merge lp://staging/~gmb/zope.testing/make-skips-work-bug-1019275 into lp://staging/~launchpad/zope.testing/3.9.4-fork

Proposed by Graham Binns
Status: Merged
Approved by: Brad Crittenden
Approved revision: 51
Merged at revision: 47
Proposed branch: lp://staging/~gmb/zope.testing/make-skips-work-bug-1019275
Merge into: lp://staging/~launchpad/zope.testing/3.9.4-fork
Diff against target: 207 lines (+151/-1)
5 files modified
setup.py (+1/-1)
src/zope/testing/testrunner/formatter.py (+9/-0)
src/zope/testing/testrunner/runner.py (+4/-0)
src/zope/testing/testrunner/test_testresult.py (+135/-0)
src/zope/testing/testrunner/tests.py (+2/-0)
To merge this branch: bzr merge lp://staging/~gmb/zope.testing/make-skips-work-bug-1019275
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Approve
Review via email: mp+112762@code.staging.launchpad.net

Commit message

Add an addSkip() method to zope.testing's own version of TestResult. The lack of this method caused skips in python 2.7 to not be recorded in zope.testing-generated subunit streams.

Description of the change

This branch fixes bug 1019275 by adding an addSkip() method to zope.testing.testrunner.runner.TestResult, and by updating the OutputFormatter classes to support test_skip() as a means out outputting data about the skip where possible.

I've added tests to cover the changes; this should help us un-break parallel testing on Python 2.7.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

As discussed in person:
 * W00t!
 * TestLayer and MockOptions use old style classes
 * Needs empty line under class definitions per PEP8

review: Approve
Revision history for this message
Launchpad QA Bot (lpqabot) wrote :
Download full text (3.8 KiB)

The attempt to merge lp:~gmb/zope.testing/make-skips-work-bug-1019275 into lp:~launchpad/zope.testing/3.9.4-fork failed. Below is the output from the failed tests.

Creating directory '/home/tarmac/repos/zope.testing/3.9.4-fork/bin'.
Creating directory '/home/tarmac/repos/zope.testing/3.9.4-fork/parts'.
Creating directory '/home/tarmac/repos/zope.testing/3.9.4-fork/eggs'.
Creating directory '/home/tarmac/repos/zope.testing/3.9.4-fork/develop-eggs'.
Getting distribution for 'setuptools'.
Got setuptools 0.6c12dev-r88846.
Generated script '/home/tarmac/repos/zope.testing/3.9.4-fork/bin/buildout'.
Develop: '/home/tarmac/repos/zope.testing/3.9.4-fork/.'
Getting distribution for 'zc.recipe.testrunner'.
Got zc.recipe.testrunner 1.4.0.
Getting distribution for 'z3c.recipe.scripts>=1.0.0'.
Got z3c.recipe.scripts 1.0.1.
Getting distribution for 'zope.testrunner'.
Got zope.testrunner 4.0.4.
Getting distribution for 'zc.recipe.egg>=1.3.0'.
Got zc.recipe.egg 1.3.2.
Getting distribution for 'zope.interface'.
********************************************************************************
WARNING:

        An optional code optimization (C extension) could not be compiled.

        Optimizations for this package will not be available!
()
command 'gcc' failed with exit status 1
********************************************************************************
Got zope.interface 4.0.1.
Getting distribution for 'zope.exceptions'.
Got zope.exceptions 4.0.0.1.
Installing test.
Generated script '/home/tarmac/repos/zope.testing/3.9.4-fork/bin/test'.
Running zope.testing.testrunner.test_testresult.TestLayer tests:
  Set up zope.testing.testrunner.test_testresult.TestLayer in 0.000 seconds.
  Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
Running zope.testrunner.layer.UnitTests tests:
  Tear down zope.testing.testrunner.test_testresult.TestLayer in 0.000 seconds.
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.

Error in test test_SubunitOutputFormatter_adds_timestamp_to_skip_if_verbose (zope.testing.testrunner.test_testresult.TestOutputFormatters)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 327, in run
    testMethod()
  File "/home/tarmac/repos/zope.testing/3.9.4-fork/src/zope/testing/testrunner/test_testresult.py", line 128, in test_SubunitOutputFormatter_adds_timestamp_to_skip_if_verbose
    options=MockOptions(verbose=3), stream=stream)
  File "/home/tarmac/repos/zope.testing/3.9.4-fork/src/zope/testing/testrunner/formatter.py", line 726, in __init__
    raise Exception("Requires subunit 0.0.5 or better")
Exception: Requires subunit 0.0.5 or better

Error in test test_SubunitOutputFormatter_outputs_skip (zope.testing.testrunner.test_testresult.TestOutputFormatters)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 327, in run
    testMethod()
  File "/home/tarmac/repos/zope.testing/3.9.4-fork/src/zope/testing/testrunner/test_testresult.py", line 115, in test_SubunitOutputFormatter_outputs_skip
    options=MockOptions(), stream=stream)
  File "/home/tarmac/repos/zope.testing/3.9.4-fork/src/zope/testing/testrunner/formatter.py", line 726, in __init__
    raise Exce...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches