Opened 10 years ago

Closed 10 years ago

Last modified 7 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: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


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/", line 744, in test_help
    self.assertOutput(out, "Usage: [options]")
  File "/home/buildbot/slaves/django/ubuntu-x86-trunk-2.4-sqlite/build/tests/regressiontests/admin_scripts/", line 112, in assertOutput
    self.failUnless(msg in stream, "'%s' does not match actual output text '%s'" % (msg, stream))
AssertionError: 'Usage: [options]' does not match actual output text 'usage: [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
                        A directory to add to the Python path, e.g.
  --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 Changed 10 years ago by CHasenpflug

I'm unable to attach a patch at this time, but the line to fix is 741 in tests/regressiontests/admin_scripts/ 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 Changed 10 years ago by Malcolm Tredinnick

Resolution: fixed
Status: newclosed

Fixed in [8108].

comment:3 Changed 7 years ago by Jacob

milestone: 1.0 beta

Milestone 1.0 beta deleted

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