Opened 7 years ago

Closed 7 years ago

Last modified 4 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:

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 Changed 7 years ago by CHasenpflug

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [8108].

comment:3 Changed 4 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

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