kitchen icon indicating copy to clipboard operation
kitchen copied to clipboard

Tests fail on openSUSE

Open mcepl opened this issue 3 years ago • 0 comments

When running the test suite while packaging for openSUSE, I got these failed tests:

[   13s] =================================== FAILURES ===================================
[   13s] _____________ TestI18N_Latin1.test_easy_gettext_setup_non_unicode ______________
[   13s]
[   13s] self = <test_i18n.TestI18N_Latin1 testMethod=test_easy_gettext_setup_non_unicode>
[   13s]
[   13s]     def test_easy_gettext_setup_non_unicode(self):
[   13s]         '''Test that the easy_gettext_setup function works
[   13s]         '''
[   13s]         b_, bN_ = i18n.easy_gettext_setup('foo', localedirs=
[   13s]                 ['%s/data/locale/' % os.path.dirname(__file__)],
[   13s]                 use_unicode=False)
[   13s]
[   13s]         self.assertEqual(b_(self.utf8_spanish), self.utf8_spanish)
[   13s] >       self.assertEqual(b_(self.u_spanish), self.latin1_spanish)
[   13s] E       AssertionError: b'El veloz murci\xc3\xa9lago salt\xc3\xb3 sobre el perro perezoso.' != b'El veloz murci\xe9lago salt\xf3 sobre el perro perezoso.'
[   13s]
[   13s] tests/test_i18n.py:402: AssertionError
[   13s] _______________ TestNewGNURealTranslations_Latin1.test_lgettext ________________
[   13s]
[   13s] self = <test_i18n.TestNewGNURealTranslations_Latin1 testMethod=test_lgettext>
[   13s]
[   13s]     def test_lgettext(self):
[   13s]         _ = self.translations.lgettext
[   13s]         self.assertEqual(_(self.utf8_kitchen), self.latin1_pt_kitchen)
[   13s]         self.assertEqual(_(self.utf8_ja_kuratomi), self.latin1_kuratomi)
[   13s] >       self.assertEqual(_(self.utf8_kuratomi), self.latin1_ja_kuratomi)
[   13s] E       AssertionError: b'\xe3\x81\x8f\xe3\x82\x89\xe3\x81\xa8\xe3\x81\xbf' != b'????'
[   13s]
[   13s] tests/test_i18n.py:570: AssertionError
[   13s] _______________ TestNewGNURealTranslations_Latin1.test_lngettext _______________
[   13s]
[   13s] self = <test_i18n.TestNewGNURealTranslations_Latin1 testMethod=test_lngettext>
[   13s]
[   13s]     def test_lngettext(self):
[   13s]         _ = self.translations.lngettext
[   13s] >       self.assertEqual(_(self.utf8_lemon, self.utf8_lemons, 1), self.latin1_limao)
[   13s] E       AssertionError: b'\xe4\xb8\x80 lim\xc3\xa3o' != b'? lim\xe3o'
[   13s]
[   13s] tests/test_i18n.py:590: AssertionError
[   13s] ___________ TestFallbackNewGNURealTranslations_Latin1.test_lgettext ____________
[   13s]
[   13s] self = <test_i18n.TestFallbackNewGNURealTranslations_Latin1 testMethod=test_lgettext>
[   13s]
[   13s]     def test_lgettext(self):
[   13s]         _ = self.translations.lgettext
[   13s]         self.assertEqual(_(self.utf8_kitchen), self.latin1_pt_kitchen)
[   13s]         self.assertEqual(_(self.utf8_ja_kuratomi), self.latin1_kuratomi)
[   13s] >       self.assertEqual(_(self.utf8_kuratomi), self.latin1_ja_kuratomi)
[   13s] E       AssertionError: b'\xe3\x81\x8f\xe3\x82\x89\xe3\x81\xa8\xe3\x81\xbf' != b'????'
[   13s]
[   13s] tests/test_i18n.py:760: AssertionError
[   13s] ___________ TestFallbackNewGNURealTranslations_Latin1.test_lngettext ___________
[   13s]
[   13s] self = <test_i18n.TestFallbackNewGNURealTranslations_Latin1 testMethod=test_lngettext>
[   13s]
[   13s]     def test_lngettext(self):
[   13s]         _ = self.translations.lngettext
[   13s] >       self.assertEqual(_(self.utf8_lemon, self.utf8_lemons, 1), self.latin1_limao)
[   13s] E       AssertionError: b'\xe4\xb8\x80 lim\xc3\xa3o' != b'? lim\xe3o'
[   13s]
[   13s] tests/test_i18n.py:775: AssertionError
[   13s] _________________ TestFallback.test_invalid_fallback_no_raise __________________
[   13s]
[   13s] self = <test_i18n.TestFallback testMethod=test_invalid_fallback_no_raise>
[   13s]
[   13s]     def test_invalid_fallback_no_raise(self):
[   13s]         '''Test when we have an invalid fallback that it does not raise.'''
[   13s]         self.assertEqual(self.gtranslations.gettext(self.u_spanish), self.utf8_spanish)
[   13s]         self.assertEqual(self.gtranslations.ugettext(self.u_spanish), self.u_spanish)
[   13s] >       self.assertEqual(self.gtranslations.lgettext(self.u_spanish), self.latin1_spanish)
[   13s] E       AssertionError: b'El veloz murci\xc3\xa9lago salt\xc3\xb3 sobre el perro perezoso.' != b'El veloz murci\xe9lago salt\xf3 sobre el perro perezoso.'
[   13s]
[   13s] tests/test_i18n.py:822: AssertionError
[   13s] =============================== warnings summary ===============================
[   13s] tests/test__all__.py:8
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test__all__.py:8: PendingDeprecationWarning: In python3, kitchen.pycompat24 is deprecated because the python stdlib has this code in all python3 versions.  If your code doesn't have to remain compatible with python less than 2.4 use python3's stdlib versions of base64, subprocess, and the builtin set types instead
[   13s]     from kitchen.pycompat24.sets import add_builtin_set
[   13s]
[   13s] tests/test__all__.py:8
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test__all__.py:8: PendingDeprecationWarning: In python3, kitchen.pycompat24.sets is deprecated.  If your code doesn't need to maintain compatibility with python less than 2.4, there is no reason to use anything in this module.
[   13s]     from kitchen.pycompat24.sets import add_builtin_set
[   13s]
[   13s] kitchen/collections/__init__.py:6
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/kitchen/collections/__init__.py:6: PendingDeprecationWarning: In python3, kitchen.collections.strictdict is deprecated.  If your code doesn't have to remain compatible with python2 use python3's native dict or defaultdict types instead
[   13s]     from kitchen.collections import strictdict
[   13s]
[   13s] tests/base_classes.py:73
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/base_classes.py:73: DeprecationWarning: invalid escape sequence \.
[   13s]     repr_re = re.compile(b'^<[^ ]*\.([^.]+) object at .*>$')
[   13s]
[   13s] kitchen/text/display.py:667
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/kitchen/text/display.py:667: DeprecationWarning: invalid escape sequence \*
[   13s]     '''Optimize the common case when deciding which :term:`textual width` is
[   13s]
[   13s] tests/test_deprecation_py3.py:9
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_deprecation_py3.py:9: PendingDeprecationWarning: In python3, kitchen.pycompat25 is deprecated because all functionality in this module is found in the python3 stdlib.  If your code doesn't need to maintain compatibility with python less than 2.5, use collections.defaultdict from the python3 stdlib.
[   13s]     from kitchen.pycompat25.collections import defaultdict
[   13s]
[   13s] tests/test_deprecation_py3.py:9
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_deprecation_py3.py:9: PendingDeprecationWarning: In python3, kitchen.pycompat25.collections is deprecated If you do not need to maintain compatibility with python less than 2.5 use collections from the stdlib instead.
[   13s]     from kitchen.pycompat25.collections import defaultdict
[   13s]
[   13s] kitchen3/tests/test_i18n.py: 132 warnings
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/kitchen/i18n/__init__.py:252: PendingDeprecationWarning: Kitchen.i18n provides gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when creating the gettext object
[   13s]     self._set_api()
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:66: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('foo', ['%s/data/locale/' % os.path.dirname(__file__)])
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object
[   13s]   /usr/lib64/python3.9/unittest/case.py:201: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     callable_obj(*args, **kwargs)
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:70: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_copy
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:83: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py: 10 warnings
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/kitchen/i18n/__init__.py:286: DeprecationWarning: set_output_charset() is deprecated
[   13s]     gettext.NullTranslations.set_output_charset(self, charset)
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_copy
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:87: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations2 = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_copy
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_copy
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:96: DeprecationWarning: output_charset() is deprecated
[   13s]     self.assertNotEqual(id(translations.output_charset()), id(translations2.output_charset()))
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_create_fallback
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:75: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_optional_params
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:103: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('test')
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_python2_api_default
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:109: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestI18N_UTF8::test_get_translation_object_python2_api_true
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:123: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py: 19 warnings
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:416: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_UTF8::test_gettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_UTF8::test_lgettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_UTF8::test_lngettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_UTF8::test_ngettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_UTF8::test_ugettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_UTF8::test_ungettext
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:435: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_gettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_lgettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_lngettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_ngettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_ugettext
[   13s] kitchen3/tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_ungettext
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:555: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test', ['%s/data/locale/' % os.path.dirname(__file__)])
[   13s]
[   13s] kitchen3/tests/test_i18n.py: 19 warnings
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:614: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_UTF8::test_gettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_UTF8::test_lgettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_UTF8::test_lngettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_UTF8::test_ngettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_UTF8::test_ugettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_UTF8::test_ungettext
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:635: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_gettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_lgettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_lngettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_ngettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_ugettext
[   13s] kitchen3/tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_ungettext
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:743: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestFallback::test_invalid_fallback_no_raise
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:799: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.gtranslations = i18n.get_translation_object('test',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestFallback::test_invalid_fallback_no_raise
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:803: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.dtranslations = i18n.get_translation_object('nonexistent',
[   13s]
[   13s] kitchen3/tests/test_i18n.py::TestDefaultLocaleDir::test_gettext
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_i18n.py:847: PendingDeprecationWarning: get_translation_object returns gettext objects that implement either the python2 or python3 gettext api.  You are currently using the python2 api.  Consider switching to the python3 api by setting python2_api=False when you call the function.
[   13s]     self.translations = i18n.get_translation_object('test')
[   13s]
[   13s] kitchen3/tests/test_pycompat.py::TestUsableModules::test_base64
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_pycompat.py:22: PendingDeprecationWarning: In python3, kitchen.pycompat24.base64 is deprecated.  If your code doesn't have to remain compatible with python2 use python3's native dict or defaultdict types instead
[   13s]     from kitchen.pycompat24.base64 import b64encode
[   13s]
[   13s] kitchen3/tests/test_pycompat.py::TestUsableModules::test_subprocess
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/kitchen/pycompat24/subprocess.py:4: PendingDeprecationWarning: In python3, kitchen.pycompat27 is deprecated because all functionality in this module is found in the python3 stdlib.  If your code doesn't need to maintain compatibility with python less than 2.7, use subprocess from the python3 stdlib.
[   13s]     import kitchen.pycompat27.subprocess as __s
[   13s]
[   13s] kitchen3/tests/test_pycompat.py::TestUsableModules::test_subprocess
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/kitchen/pycompat24/subprocess.py:4: PendingDeprecationWarning: In python3, kitchen.pycompat27.subprocess is deprecated.  If your code doesn't have to remain compatible with python less than 2.7 use subprocess from the python3 stdlib
[   13s]     import kitchen.pycompat27.subprocess as __s
[   13s]
[   13s] kitchen3/tests/test_pycompat.py::TestUsableModules::test_subprocess
[   13s]   /home/abuild/rpmbuild/BUILD/kitchen-1.2.6/kitchen3/tests/test_pycompat.py:10: PendingDeprecationWarning: In python3, kitchen.pycompat24.subprocess is deprecated.  If your code doesn't have to remain compatible with python less than 2.4 use subprocess from the python3 stdlib
[   13s]     from kitchen.pycompat24.subprocess import Popen
[   13s]
[   13s] -- Docs: https://docs.pytest.org/en/stable/warnings.html
[   13s] =========================== short test summary info ============================
[   13s] FAILED tests/test_i18n.py::TestI18N_Latin1::test_easy_gettext_setup_non_unicode
[   13s] FAILED tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_lgettext
[   13s] FAILED tests/test_i18n.py::TestNewGNURealTranslations_Latin1::test_lngettext
[   13s] FAILED tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_lgettext
[   13s] FAILED tests/test_i18n.py::TestFallbackNewGNURealTranslations_Latin1::test_lngettext
[   13s] FAILED tests/test_i18n.py::TestFallback::test_invalid_fallback_no_raise - Ass...
[   13s] ===== 6 failed, 180 passed, 3 skipped, 1 deselected, 229 warnings in 8.02s =====

Complete build log

mcepl avatar Mar 21 '22 21:03 mcepl