bin/test.py should be called bin/test

Bug #143686 reported by Daniel Nouri
2
Affects Status Importance Assigned to Milestone
Zope 2
Fix Released
Medium
Unassigned

Bug Description

Zope3 has bin/test probably because of the same issue. When some test tries to import the 'test' Python standard module, they get back the test script. If we call it ``test``, this problem will be gone.

When running my zope.testbrowser tests I get the following:

Traceback (most recent call last):
  File "test_doctests.py", line 19, in ?
  File "/home/daniel/devel/z29-instances/plone25/Products/PasswordResetTool/tests/utils/__init__.py", line 2, in ?
    from testbrowser import Browser
  File "/home/daniel/devel/z29-instances/plone25/Products/PasswordResetTool/tests/utils/testbrowser.py", line 13, in ?
    from zope.testbrowser import testing
  File "/home/daniel/lib/Zope-2.9.2//lib/python/zope/testbrowser/__init__.py", line 19, in ?
    from testing import Browser
  File "/home/daniel/lib/Zope-2.9.2//lib/python/zope/testbrowser/testing.py", line 25, in ?
    from zope.testbrowser import browser
  File "/home/daniel/lib/Zope-2.9.2//lib/python/zope/testbrowser/browser.py", line 19, in ?
    from test import pystone
  File "/home/daniel/lib/Zope-2.9.2/bin/test.py", line 94, in ?
    help="""\
  File "/usr/lib/python2.4/optparse.py", line 939, in add_option
    self._check_conflict(option)
  File "/usr/lib/python2.4/optparse.py", line 914, in _check_conflict
    option)
OptionConflictError: option --config-file: conflicting option string(s): --config-file

Tags: bug zope
Revision history for this message
Daniel Nouri (daniel.nouri) wrote :

This seems to work well for 'In-Place' instances.

Revision history for this message
Hanno Schlichting (hannosch) wrote :

Current Zope releases don't contain the test.py module anymore but have switched to external test runners, like the buildout based zc.recipe.testrunner.

Changed in zope2:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.