#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
'
----------------------------------------------------------------------
Note:
See TracTickets
for help on using tickets.
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?