Pylons/translationstring — Issue #8: Test failures in translationstring 1.0
Author: Arfrever
Created: 2012-02-08 01:27:55+00:00
State: open

translationstring 0.4 passes all tests. translationstring 1.0 fails 8 tests.

```
$ python2.7 setup.py test
running test
running egg_info
writing translationstring.egg-info/PKG-INFO
writing top-level names to translationstring.egg-info/top_level.txt
writing dependency_links to translationstring.egg-info/dependency_links.txt
reading manifest file 'translationstring.egg-info/SOURCES.txt'
writing manifest file 'translationstring.egg-info/SOURCES.txt'
running build_ext
test_chameleon_default_marker_returned (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_msgid_nonstring (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_msgid_not_none_not_string (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_msgid_text_type_translator_is_None (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_msgid_text_type_translator_is_not_None (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_msgid_translationstring_translator_is_None (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_msgid_translationstring_translator_is_not_None (translationstring.tests.test__init__.TestChameleonTranslate) ... ok
test_policy_returns_translated (translationstring.tests.test__init__.TestPluralizer) ... ok
test_translations_None_interpolation_not_required (translationstring.tests.test__init__.TestPluralizer) ... ok
test_translations_None_interpolation_required (translationstring.tests.test__init__.TestPluralizer) ... ok
test___getstate__ (translationstring.tests.test__init__.TestTranslationString) ... ok
test___reduce__ (translationstring.tests.test__init__.TestTranslationString) ... ok
test_allargs (translationstring.tests.test__init__.TestTranslationString) ... ok
test_default_None (translationstring.tests.test__init__.TestTranslationString) ... ok
test_default_not_None (translationstring.tests.test__init__.TestTranslationString) ... ok
test_format_extend_existing_mapping (translationstring.tests.test__init__.TestTranslationString) ... ok
test_format_no_exising_mapping (translationstring.tests.test__init__.TestTranslationString) ... ok
test_format_required_dict_argument (translationstring.tests.test__init__.TestTranslationString) ... ok
test_interpolate_double_dollar_escape (translationstring.tests.test__init__.TestTranslationString) ... ok
test_interpolate_missing_mapping (translationstring.tests.test__init__.TestTranslationString) ... ok
test_interpolate_missing_not_interpolated (translationstring.tests.test__init__.TestTranslationString) ... ok
test_interpolate_passed_translated (translationstring.tests.test__init__.TestTranslationString) ... ok
test_interpolate_subsitution_more_than_once (translationstring.tests.test__init__.TestTranslationString) ... ok
test_interpolate_substitution (translationstring.tests.test__init__.TestTranslationString) ... ok
test_is_text_type_subclass (translationstring.tests.test__init__.TestTranslationString) ... ok
test_msgid_is_translation_string (translationstring.tests.test__init__.TestTranslationString) ... ok
test_allargs (translationstring.tests.test__init__.TestTranslationStringFactory) ... ok
test_policy_returns_msgid (translationstring.tests.test__init__.TestTranslator) ... ok
test_policy_returns_translation (translationstring.tests.test__init__.TestTranslator) ... ok
test_translate_normal_string_with_domain (translationstring.tests.test__init__.TestTranslator) ... ok
test_translate_normal_string_with_mapping (translationstring.tests.test__init__.TestTranslator) ... ok
test_translate_normal_string_with_no_domain (translationstring.tests.test__init__.TestTranslator) ... ok
test_translations_None_interpolation_not_required (translationstring.tests.test__init__.TestTranslator) ... ok
test_translations_None_interpolation_required (translationstring.tests.test__init__.TestTranslator) ... ok
test_it_translations_has_no_dugettext (translationstring.tests.test__init__.Test_dugettext_policy) ... ok
test_it_use_default_domain (translationstring.tests.test__init__.Test_dugettext_policy) ... ok
test_it_use_explicit_domain (translationstring.tests.test__init__.Test_dugettext_policy) ... ok
test_it_use_translations_domain (translationstring.tests.test__init__.Test_dugettext_policy) ... ok
test_it_use_tstring_domain (translationstring.tests.test__init__.Test_dugettext_policy) ... ok
test_it_translations_has_no_dungettext (translationstring.tests.test__init__.Test_dungettext_policy) ... ok
test_it_use_default_domain (translationstring.tests.test__init__.Test_dungettext_policy) ... ok
test_it_use_passed_domain (translationstring.tests.test__init__.Test_dungettext_policy) ... ok
test_it_use_translation_domain (translationstring.tests.test__init__.Test_dungettext_policy) ... ok
test_it (translationstring.tests.test__init__.Test_ugettext_policy) ... ok
test_it (translationstring.tests.test__init__.Test_ungettext_policy) ... ok
test_pluralizer_dungettext_policy (translationstring.tests.test_integration.PluralizerIntegrationTests) ... ERROR
test_pluralizer_ungettext_policy (translationstring.tests.test_integration.PluralizerIntegrationTests) ... ERROR
test_translator_dugettext_policy (translationstring.tests.test_integration.TranslatorIntegrationTests) ... ERROR
test_translator_ugettext_policy (translationstring.tests.test_integration.TranslatorIntegrationTests) ... ERROR
test_translator_with_interpolation (translationstring.tests.test_integration.TranslatorIntegrationTests) ... ERROR
test_translator_with_interpolation_in_translate (translationstring.tests.test_integration.TranslatorIntegrationTests) ... ERROR
test_translator_with_interpolation_overridden_in_translate (translationstring.tests.test_integration.TranslatorIntegrationTests) ... ERROR
test_translator_with_interpolation_partially_overridden_in_translate (translationstring.tests.test_integration.TranslatorIntegrationTests) ... ERROR

======================================================================
ERROR: test_pluralizer_dungettext_policy (translationstring.tests.test_integration.PluralizerIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 120, in test_pluralizer_dungettext_policy
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 103, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_pluralizer_ungettext_policy (translationstring.tests.test_integration.PluralizerIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 106, in test_pluralizer_ungettext_policy
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 103, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_translator_dugettext_policy (translationstring.tests.test_integration.TranslatorIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 26, in test_translator_dugettext_policy
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 9, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_translator_ugettext_policy (translationstring.tests.test_integration.TranslatorIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 12, in test_translator_ugettext_policy
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 9, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_translator_with_interpolation (translationstring.tests.test_integration.TranslatorIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 40, in test_translator_with_interpolation
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 9, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_translator_with_interpolation_in_translate (translationstring.tests.test_integration.TranslatorIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 53, in test_translator_with_interpolation_in_translate
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 9, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_translator_with_interpolation_overridden_in_translate (translationstring.tests.test_integration.TranslatorIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 66, in test_translator_with_interpolation_overridden_in_translate
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 9, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

======================================================================
ERROR: test_translator_with_interpolation_partially_overridden_in_translate (translationstring.tests.test_integration.TranslatorIntegrationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 79, in test_translator_with_interpolation_partially_overridden_in_translate
translations = self._makeTranslations()
File "/tmp/translationstring-1.0/translationstring/tests/test_integration.py", line 9, in _makeTranslations
return Translations.load(localedir, locales=['de'])
File "/tmp/translationstring-1.0/translationstring/tests/translations.py", line 37, in load
fp = open(filename, 'rb')
TypeError: coercing to Unicode: need string or buffer, NoneType found

----------------------------------------------------------------------
Ran 53 tests in 0.011s

FAILED (errors=8)
```