tests failing (AttributeError: type object 'IconTheme' has no attribute 'get_default')
Versions
- OS: Linux/Gentoo
- Gajim version: 1.3.3-2
- GTK version: 3.24.31
- Python-nbxmpp version: 2.0.4
Steps to reproduce the problem
- Run 'python -m unittest' or 'python setup.py test'
- See test failure
Expected behavior
Tests pass.
Actual behavior
Tests fail with several errors (full output below).
I'm not sure if tests are expected to pass and if they need something special to be called, hope to clarify this.
No translations found
Dirs searched: [PosixPath('/home/hanno/.local/share'), PosixPath('/usr/local/share'), PosixPath('/usr/share')]
/tmp/gajim-1.3.3/gajim/common/app.py:41: PyGIWarning: Gdk was imported without specifying a version first. Use gi.require_version('Gdk', '4.0') before import to ensure that the right version gets loaded.
from gi.repository import Gdk
/tmp/gajim-1.3.3/gajim/gtk/util.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk
Logger gajim level set to 50
Logger nbxmpp level set to 50
E.EE
======================================================================
ERROR: gajim.plugins (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: gajim.plugins
Traceback (most recent call last):
File "/usr/lib/python3.10/unittest/loader.py", line 470, in _find_test_path
package = self._get_module_from_name(name)
File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/tmp/gajim-1.3.3/gajim/plugins/__init__.py", line 24, in <module>
from gajim.plugins.pluginmanager import PluginManager
File "/tmp/gajim-1.3.3/gajim/plugins/pluginmanager.py", line 45, in <module>
from gajim.common.helpers import Singleton
File "/tmp/gajim-1.3.3/gajim/common/helpers.py", line 84, in <module>
from gajim.common.regex import INVALID_XML_CHARS_REGEX
File "/tmp/gajim-1.3.3/gajim/common/regex.py", line 76, in <module>
EMOT_AND_LINK_REGEX = re.compile(_get_emot_and_basic_pattern(False),
File "/tmp/gajim-1.3.3/gajim/common/regex.py", line 58, in _get_emot_and_basic_pattern
from gajim.gui.emoji_data import emoji_data
ModuleNotFoundError: No module named 'gajim.gui.emoji_data'
======================================================================
ERROR: test.no_gui.unit.test_nick_completion (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test.no_gui.unit.test_nick_completion
Traceback (most recent call last):
File "/usr/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/tmp/gajim-1.3.3/test/no_gui/unit/test_nick_completion.py", line 5, in <module>
from gajim.gui.util import NickCompletionGenerator
File "/tmp/gajim-1.3.3/gajim/gtk/util.py", line 63, in <module>
_icon_theme = Gtk.IconTheme.get_default()
AttributeError: type object 'IconTheme' has no attribute 'get_default'
======================================================================
ERROR: test.unit.test_gui_interface (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test.unit.test_gui_interface
Traceback (most recent call last):
File "/usr/lib/python3.10/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/usr/lib/python3.10/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/tmp/gajim-1.3.3/test/unit/test_gui_interface.py", line 17, in <module>
from gajim.gui_interface import Interface
File "/tmp/gajim-1.3.3/gajim/gui_interface.py", line 58, in <module>
from gajim import gui_menu_builder
File "/tmp/gajim-1.3.3/gajim/gui_menu_builder.py", line 29, in <module>
from gajim.gui.util import get_builder
File "/tmp/gajim-1.3.3/gajim/gtk/util.py", line 63, in <module>
_icon_theme = Gtk.IconTheme.get_default()
AttributeError: type object 'IconTheme' has no attribute 'get_default'
----------------------------------------------------------------------
Ran 4 tests in 0.000s
FAILED (errors=3)