[Zope-dev] Buggy zc.recipe.testrunner 1.4.0?

Jonathan Ballet jonathan.ballet at securactive.net
Wed Oct 13 12:05:25 EDT 2010


Hello,

I noticed that some of our tests started to fail due to missing
environment values in the test script generated by zc.recipe.testrunner.
Switching back the version from 1.4.0 to 1.3.0 fixed the issue.

So, I tried to run the tests of the 1.4.0 release (using the tarball
from Pypi), and I have a bunch of failures, which are summed in the
attached file (also available in http://pastebin.com/HtVk8sKX if the
mailing list doesn't allow attachments). My problem reflects in the
following test:

=====================================================
    File "/tmp/sb/zc.recipe.testrunner-1.4.0/src/zc/recipe/testrunner/README.txt",
line 487, in README.txt
    Failed example:
        cat(sample_buildout, 'bin', 'testdemo')
    Expected:
        #!python -S
        <BLANKLINE>
        import sys
        sys.path[0:0] = [
            '/sample-buildout/parts/testdemo/site-packages',
            ]
        <BLANKLINE>
        <BLANKLINE>
        import os
        path = sys.path[0]
        if os.environ.get('PYTHONPATH'):
            path = os.pathsep.join([path, os.environ['PYTHONPATH']])
        os.environ['PYTHONPATH'] = path
        import site # imports custom buildout-generated site.py
        import os
        sys.argv[0] = os.path.abspath(sys.argv[0])
        os.chdir('/sample-buildout/parts/testdemo/working-directory')
        os.environ['zc.recipe.testrunner'] = '42'
        <BLANKLINE>
        import zope.testrunner
        <BLANKLINE>
        if __name__ == '__main__':
            zope.testrunner.run([
                '--test-path', '/sample-buildout/demo',
                ])
    Got:
        #!python
        <BLANKLINE>
        import sys
        sys.path[0:0] = [
            '/sample-buildout/demo',
            '/sample-buildout/eggs/zope.testrunner-X-pyN.N.egg',
            '/sample-buildout/eggs/zope.interface-X-pyN.N.egg',
            '/sample-buildout/eggs/zope.exceptions-X-pyN.N.egg',
            '/sample-buildout/eggs/setuptools-X-pyN.N.egg',
            ]
        <BLANKLINE>
        <BLANKLINE>
        import zope.testrunner
        <BLANKLINE>
        if __name__ == '__main__':
            zope.testrunner.run([
                '--test-path', '/sample-buildout/demo',
                ])
=====================================================

As you can see, the generated file misses the line
``os.environ['zc.recipe.testrunner'] = '42' ``.

Here is the content of "bin/test" generated by Buildout in the
zc.recipe.testrunner 1.4.0 directory (in case there are weird
dependencies):

=====================================================
    #!/tmp/sb/zc.recipe.testrunner-1.4.0/../bin/python

    import sys
    sys.path[0:0] = [
        '/tmp/sb/zc.recipe.testrunner-1.4.0/src',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.testrunner-4.0.0b5-py2.5.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.interface-3.6.1-py2.5-linux-x86_64.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.exceptions-3.6.1-py2.5.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/setuptools-0.6c12dev_r85381-py2.5.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zope.testing-3.10.0-py2.5.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/z3c.recipe.scripts-1.0.1-py2.5.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zc.buildout-1.5.2-py2.5.egg',
        '/tmp/sb/zc.recipe.testrunner-1.4.0/eggs/zc.recipe.egg-1.3.2-py2.5.egg',
        ]


    import zope.testrunner

    if __name__ == '__main__':
        zope.testrunner.run([
            '--test-path', '/tmp/sb/zc.recipe.testrunner-1.4.0/src',
            ])
=====================================================

It seems to be a serious regression, so I guess I have something wrong
on my side, otherwise other people would have noticed it. What do I
miss?
Are there any public continuous integration reports for those projects?

Thanks,

 Jonathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-zc.recipe.testrunner-1.4.0.log
Type: text/x-log
Size: 28455 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20101013/146cac0f/attachment-0001.bin 


More information about the Zope-Dev mailing list