Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28348 closed Bug (fixed)

runtests.py fails if xgettext utility is not on system path

Reported by: Evan Grim Owned by: Evan Grim
Component: Testing framework Version: 1.11
Severity: Normal Keywords: testing skip xgettext runtests
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Running the tests (with runtests.py) fails if the xgettext utility is not on the system path.

Error report:

======================================================================
ERROR: i18n.test_extraction (unittest.loader._FailedTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 601, in run
    testMethod()
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/loader.py", line 34, in testFailure
    raise self._exception
ImportError: Failed to import test module: i18n.test_extraction
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/Users/egrim/scratch/django/tests/i18n/test_extraction.py", line 28, in <module>
    requires_gettext_019 = skipIf(gettext_version < (0, 19), 'gettext 0.19 required')
TypeError: '<' not supported between instances of 'NoneType' and 'tuple'


----------------------------------------------------------------------
Ran 11482 tests in 83.136s

FAILED (errors=1, skipped=734, expected failures=4)

Change History (1)

comment:1 by Evan Grim, 7 years ago

Resolution: fixed
Status: assignedclosed

In 0b00a8988b63747e93a37354aca8863671dcfbcf:

Fixed crash in i18n tests skip condition if gettext isn't installed.

Last edited 7 years ago by Tim Graham (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top