zope.testrunner's buildout makes failing tests

Bug #580083 reported by Tres Seaver on 2010-05-13
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Lennart Regebro

Bug Description

On [the trunk of zope.testrunner::

  $ cd /tmp
  $ svn co $ZSVN/zope.testrunner/trunk testrunner

I can run the tests fine from a virtualenv::

  $ /opt/Python-2.6.5/bin/virtualenv --no-site-packages /tmp/xxx
  $ /tmp/xxx/bin/python setup.py develop
  $ /tmp/xxx/bin/easy_install zope.testing
  $ /tmp/xxx/bin/python setup.py test
  running build_ext
  Running zope.testrunner.layer.UnitTests tests:
    Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
    Ran 27 tests with 0 failures and 0 errors in 22.256 seconds.
  Tearing down left over layers:
    Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

but not via zc.buildout:

  $ /opt/Python-2.6.5/bin/python bootstrap.py
  $ bin/buildout
  $ bin/test
  <doctest spew>

Tres Seaver (tseaver) wrote :

Having the buildout's own tests fail makes it impossible to do "normal"
development in this project.

Changed in zope.testrunner:
status: New → Confirmed
importance: Undecided → High
importance: High → Critical
assignee: nobody → Lennart Regebro (regebro-gmail)
Marius Gedminas (mgedmin) wrote :

FWIW 'python setup.py test' works (and leaves two zipped egg files in the current working directory).

Marius Gedminas (mgedmin) wrote :

Looking at bin/test as generated by buildout I see

        '--test-path', '/home/mg/src/zope.testrunner/src',
        '--test-path', '/home/mg/.buildout/eggs/zope.testing-3.9.5-py2.6.egg',

which means it's trying to run zope.testing's test suite too, which fails.

My fault: I added zope.testing to buildout.cfg:

  recipe = zc.recipe.testrunner
  eggs = zope.testrunner

because zope.testrunner itself doesn't depend on zope.testing and thus bin/test used to fail with an import error.

What's the right buildout incantation of enabling extra test dependencies without running their tests?

summary: - zope.testrunner's buldout makes failing tests
+ zope.testrunner's buildout makes failing tests
Marius Gedminas (mgedmin) wrote :

I couldn't find a cleaner way, so ended up adding extras_require to setup.py with a 'test' extra depending on zope.testing. and changing the buildout recipe to

  recipe = zc.recipe.testrunner
  eggs = zope.testrunner[test]

It works.

Changed in zope.testrunner:
status: Confirmed → Fix Committed

Hash: SHA1

Marius Gedminas wrote:

> What's the right buildout incantation of enabling extra test
> dependencies without running their tests?

Should be something like:

 recipe = zc.recipe.testrunner
 eggs = zope.testrunner [test]

Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Tres Seaver (tseaver) wrote :
Changed in zope.testrunner:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers