#24500: Django runtests - 3 tests fail on windows due to encoding troubles
--------------------------------------+--------------------
Reporter: pakal | Owner: nobody
Type: Bug | Status: new
Component: Internationalization | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
On a my python2.7.3 install (32 bits), a today's checkout of django's
master doesn't pass all tests - three i18n tests fails due to
UnicodeDecodeError.
I'm aware it might be due to locales
(https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/unit-tests/#many-test-failures-with-unicodeencodeerror), but windows
doesn't have such packages that I'm aware of.
My win32 "xgettext --version" is "xgettext (GNU gettext-tools) 0.17"
I've followed the bug down to the xgettext invocation, where it seems the
test expects utf8 output, whereas my xgettext-win32 version of course
outputs ANSI (french locale) text.
{{{
UnicodeDecodeError('utf8', "xgettext (GNU gettext-tools) 0.17\nCopyright
(C) 1995-1998, 2000-2007 Free Software Foundation, Inc.\nLicence GPLv3+ :
GNU GPL version 3 ou ult\xe9rieure
<http://gnu.org/licenses/gpl.html>\nCeci est un logiciel libre : vous
pouvez le modifier et le redistribuer.\nIl n'y a PAS DE GARANTIE, dans la
mesure de ce que permet la loi.\n\xc9crit par Ulrich
Drepper.\n", 141, 142, 'invalid continuation byte')
}}}
Are these tests supposed to pass on windows as well as on *nix systems ?
Are there specific requirements regarding xgettext or third-party packages
?
{{{
examining files with the extensions: .js
ignoring file code.sample in .
ignoring file not_utf8.sample in .
ignoring file __init__.py in .
ignoring file ignored.html in .\ignore_dir
ignoring file media_ignored.html in .\media_root
ignoring file static_ignored.html in .\static
ignoring file comments.thtml in .\templates
ignoring file empty.html in .\templates
ignoring file plural.djtpl in .\templates
ignoring file template_with_error.tpl in .\templates
ignoring file test.html in .\templates
ignoring file xxx_ignored.html in .\templates
ignoring file ignored.html in .\templates\subdir
processing file javascript.js in .
UnicodeDecodeError: skipped file javascript.js in .
processing file javascript.js in .\someapp\static
UnicodeDecodeError: skipped file javascript.js in .\someapp\static
processing file javascript_ignored.js in .\static
UnicodeDecodeError: skipped file javascript_ignored.js in .\static
processing locale de
======================================================================
FAIL: test_default_root_settings
(i18n.test_extraction.JavascriptExtractorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "P:\Websites\django\django\test\utils.py", line 180, in inner
return test_func(*args, **kwargs)
File "P:\Websites\django\tests\i18n\test_extraction.py", line 454, in
test_default_root_settings
_, po_contents = self._run_makemessages(domain='djangojs')
File "P:\Websites\django\tests\i18n\test_extraction.py", line 67, in
_run_makemessages
self.assertTrue(os.path.exists(self.PO_FILE))
AssertionError: False is not true
======================================================================
FAIL: test_javascript_literals
(i18n.test_extraction.JavascriptExtractorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "P:\Websites\django\tests\i18n\test_extraction.py", line 422, in
test_javascript_literals
_, po_contents = self._run_makemessages(domain='djangojs')
File "P:\Websites\django\tests\i18n\test_extraction.py", line 67, in
_run_makemessages
self.assertTrue(os.path.exists(self.PO_FILE))
AssertionError: False is not true
======================================================================
FAIL: test_media_static_dirs_ignored
(i18n.test_extraction.JavascriptExtractorTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "P:\Websites\django\django\test\utils.py", line 180, in inner
return test_func(*args, **kwargs)
File "P:\Websites\django\tests\i18n\test_extraction.py", line 445, in
test_media_static_dirs_ignored
_, po_contents = self._run_makemessages(domain='djangojs')
File "P:\Websites\django\tests\i18n\test_extraction.py", line 67, in
_run_makemessages
self.assertTrue(os.path.exists(self.PO_FILE))
AssertionError: False is not true
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24500>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.bcc7a25ce6bf1cce61e1d101ecbc6683%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.