Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#7928 closed (fixed)

python2.4 fails --help is handled as a special case

Reported by: CHasenpflug Owned by: nobody
Component: Testing framework Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

As a result of r8055, python 2.4 also outputs "usage:".

======================================================================
FAIL: --help is handled as a special case
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/slaves/django/ubuntu-x86-trunk-2.4-sqlite/build/tests/regressiontests/admin_scripts/tests.py", line 744, in test_help
    self.assertOutput(out, "Usage: manage.py [options]")
  File "/home/buildbot/slaves/django/ubuntu-x86-trunk-2.4-sqlite/build/tests/regressiontests/admin_scripts/tests.py", line 112, in assertOutput
    self.failUnless(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
AssertionError: 'Usage: manage.py [options]' does not match actual output text 'usage: manage.py [options]

options:
  --settings=SETTINGS   The Python path to a settings module, e.g.
                        "myproject.settings.main". If this isn't provided, the
                        DJANGO_SETTINGS_MODULE environment variable will be
                        used.
  --pythonpath=PYTHONPATH
                        A directory to add to the Python path, e.g.
                        "/home/djangoprojects/myproject".
  --traceback           Print traceback on exception
  --version             show program's version number and exit
  -h, --help            show this help message and exit
'

----------------------------------------------------------------------

Change History (3)

comment:1 by CHasenpflug, 16 years ago

I'm unable to attach a patch at this time, but the line to fix is 741 in tests/regressiontests/admin_scripts/tests.py. Change to 2, 5.

Would the better approach to this however be to do case insensitive string comparisons, possibly by converting both to uppercase or lowercase?

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in [8108].

comment:3 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top