Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wx tests fail with 8.0.0 #2030

Open
opoplawski opened this issue Jun 11, 2023 · 4 comments
Open

wx tests fail with 8.0.0 #2030

opoplawski opened this issue Jun 11, 2023 · 4 comments

Comments

@opoplawski
Copy link
Contributor

Updating traitsui to 8.0.0 in Fedora, getting the following test failures with wx toolkit:

======================================================================
ERROR: test_custom_button_editor_clicked (traitsui.tests.editors.test_button_editor.TestButtonEditor.test_custom_button_editor_clicked)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_button_editor.py", line 122, in test_custom_button_editor_clicked
    self.check_button_fired_event(custom_view)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_button_editor.py", line 110, in check_button_fired_event
    with tester.create_ui(button_text_edit, dict(view=view)) as ui:
  File "/usr/lib64/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 105, in create_ui
    ui = object.edit_traits(**ui_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/traits/has_traits.py", line 1812, in edit_traits
    return view.ui(
           ^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/view.py", line 457, in ui
    ui.ui(parent, kind)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/ui.py", line 234, in ui
    self.rebuild(self, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/toolkit.py", line 118, in ui_live
    ui_live.ui_live(ui, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 47, in ui_live
    _ui_dialog(ui, parent, BaseDialog.NONMODAL)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 81, in _ui_dialog
    BaseDialog.display_ui(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_base.py", line 64, in display_ui
    ui.owner.init(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 195, in init
    sw = panel(ui, window)
         ^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 265, in panel
    sg_sizer, resizable, contents = fill_panel_for_group(
                                    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 422, in fill_panel_for_group
    fp = FillPanel(
         ^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 577, in __init__
    self.add_items(content, panel, self.sizer)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 952, in add_items
    width, height = control.GetSize()
                    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'GetSize'

======================================================================
ERROR: test_custom_button_editor_disabled (traitsui.tests.editors.test_button_editor.TestButtonEditor.test_custom_button_editor_disabled)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_button_editor.py", line 158, in test_custom_button_editor_disabled
    self.check_button_disabled("custom")
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_button_editor.py", line 138, in check_button_disabled
    with tester.create_ui(button_text_edit, dict(view=view)) as ui:
  File "/usr/lib64/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 105, in create_ui
    ui = object.edit_traits(**ui_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/traits/has_traits.py", line 1812, in edit_traits
    return view.ui(
           ^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/view.py", line 457, in ui
    ui.ui(parent, kind)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/ui.py", line 234, in ui
    self.rebuild(self, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/toolkit.py", line 118, in ui_live
    ui_live.ui_live(ui, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 47, in ui_live
    _ui_dialog(ui, parent, BaseDialog.NONMODAL)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 81, in _ui_dialog
    BaseDialog.display_ui(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_base.py", line 64, in display_ui
    ui.owner.init(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 195, in init
    sw = panel(ui, window)
         ^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 265, in panel
    sg_sizer, resizable, contents = fill_panel_for_group(
                                    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 422, in fill_panel_for_group
    fp = FillPanel(
         ^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 577, in __init__
    self.add_items(content, panel, self.sizer)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 952, in add_items
    width, height = control.GetSize()
                    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'GetSize'

======================================================================
ERROR: test_custom_image_value (traitsui.tests.editors.test_button_editor.TestButtonEditor.test_custom_image_value)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_button_editor.py", line 164, in test_custom_image_value
    with tester.create_ui(
  File "/usr/lib64/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 105, in create_ui
    ui = object.edit_traits(**ui_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/traits/has_traits.py", line 1812, in edit_traits
    return view.ui(
           ^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/view.py", line 457, in ui
    ui.ui(parent, kind)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/ui.py", line 234, in ui
    self.rebuild(self, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/toolkit.py", line 118, in ui_live
    ui_live.ui_live(ui, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 47, in ui_live
    _ui_dialog(ui, parent, BaseDialog.NONMODAL)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 81, in _ui_dialog
    BaseDialog.display_ui(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_base.py", line 64, in display_ui
    ui.owner.init(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 195, in init
    sw = panel(ui, window)
         ^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 265, in panel
    sg_sizer, resizable, contents = fill_panel_for_group(
                                    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 422, in fill_panel_for_group
    fp = FillPanel(
         ^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 577, in __init__
    self.add_items(content, panel, self.sizer)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 952, in add_items
    width, height = control.GetSize()
                    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'GetSize'

======================================================================
ERROR: test_styles (traitsui.tests.editors.test_button_editor.TestButtonEditor.test_styles)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_button_editor.py", line 95, in test_styles
    with UITester().create_ui(button_text_edit):
  File "/usr/lib64/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 105, in create_ui
    ui = object.edit_traits(**ui_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/traits/has_traits.py", line 1812, in edit_traits
    return view.ui(
           ^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/view.py", line 457, in ui
    ui.ui(parent, kind)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/ui.py", line 234, in ui
    self.rebuild(self, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/toolkit.py", line 118, in ui_live
    ui_live.ui_live(ui, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 47, in ui_live
    _ui_dialog(ui, parent, BaseDialog.NONMODAL)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 81, in _ui_dialog
    BaseDialog.display_ui(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_base.py", line 64, in display_ui
    ui.owner.init(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 195, in init
    sw = panel(ui, window)
         ^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 265, in panel
    sg_sizer, resizable, contents = fill_panel_for_group(
                                    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 422, in fill_panel_for_group
    fp = FillPanel(
         ^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 577, in __init__
    self.add_items(content, panel, self.sizer)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 952, in add_items
    width, height = control.GetSize()
                    ^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'GetSize'

======================================================================
ERROR: test_range_text_editor_set_with_text_valid_and_none_bound (traitsui.tests.editors.test_range_editor.TestRangeEditor.test_range_text_editor_set_with_text_valid_and_none_bound)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_range_editor.py", line 180, in test_range_text_editor_set_with_text_valid_and_none_bound
    number_field_text.perform(KeyClick("0"))
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 247, in perform
    self._perform_or_inspect(interaction)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 312, in _perform_or_inspect
    with context():
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 366, in _event_processed
    with _reraise_exceptions():
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/_exception_handling.py", line 73, in reraise_exceptions
    raise RuntimeError(msg)
RuntimeError: Uncaught exceptions found.
=== Exception (type: <class 'TypeError'>, value: '>' not supported between instances of 'int' and 'NoneType') ===
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/range_editor.py", line 848, in update_object
    if value < self.low or value > self.high:
                           ^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'int' and 'NoneType'


======================================================================
ERROR: test_data_frame_editor_font_mapping (traitsui.tests.ui_editors.test_data_frame_editor.TestDataFrameEditor.test_data_frame_editor_font_mapping)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/ui_editors/test_data_frame_editor.py", line 374, in test_data_frame_editor_font_mapping
    with reraise_exceptions(), create_ui(
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 109, in create_ui
    with reraise_exceptions():
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/_exception_handling.py", line 73, in reraise_exceptions
    raise RuntimeError(msg)
RuntimeError: Uncaught exceptions found.
=== Exception (type: <class 'TypeError'>, value: ItemAttr.SetFont(): argument 1 has unexpected type 'str') ===
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/tabular_editor.py", line 155, in OnGetItemAttr
    attr.SetFont(font)
TypeError: ItemAttr.SetFont(): argument 1 has unexpected type 'str'

=== Exception (type: <class 'TypeError'>, value: ItemAttr.SetFont(): argument 1 has unexpected type 'str') ===
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/tabular_editor.py", line 155, in OnGetItemAttr
    attr.SetFont(font)
TypeError: ItemAttr.SetFont(): argument 1 has unexpected type 'str'

=== Exception (type: <class 'TypeError'>, value: ItemAttr.SetFont(): argument 1 has unexpected type 'str') ===
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/tabular_editor.py", line 155, in OnGetItemAttr
    attr.SetFont(font)
TypeError: ItemAttr.SetFont(): argument 1 has unexpected type 'str'

=== Exception (type: <class 'TypeError'>, value: ItemAttr.SetFont(): argument 1 has unexpected type 'str') ===
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/tabular_editor.py", line 155, in OnGetItemAttr
    attr.SetFont(font)
TypeError: ItemAttr.SetFont(): argument 1 has unexpected type 'str'


======================================================================
FAIL: test_error_from_gui_captured_and_raise (traitsui.testing.tests.test_exception_handling.TestExceptionHandling.test_error_from_gui_captured_and_raise)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tests/test_exception_handling.py", line 39, in test_error_from_gui_captured_and_raise
    with self.assertRaises(
  File "/usr/lib64/python3.11/unittest/_log.py", line 84, in __exit__
    self._raiseFailure(
AssertionError: no logs of level INFO or higher triggered on traitsui

======================================================================
FAIL: test_animated_gif_editor (traitsui.tests.editors.test_animatedGIF_editor.TestAnimatedGIFEditor.test_animated_gif_editor)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_animatedGIF_editor.py", line 55, in test_animated_gif_editor
    with create_ui(obj1, dict(view=view)):
  File "/usr/lib64/python3.11/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 105, in create_ui
    ui = object.edit_traits(**ui_kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/traits/has_traits.py", line 1812, in edit_traits
    return view.ui(
           ^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/view.py", line 457, in ui
    ui.ui(parent, kind)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/ui.py", line 234, in ui
    self.rebuild(self, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/toolkit.py", line 118, in ui_live
    ui_live.ui_live(ui, parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 47, in ui_live
    _ui_dialog(ui, parent, BaseDialog.NONMODAL)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 81, in _ui_dialog
    BaseDialog.display_ui(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_base.py", line 64, in display_ui
    ui.owner.init(ui, parent, style)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_live.py", line 195, in init
    sw = panel(ui, window)
         ^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 265, in panel
    sg_sizer, resizable, contents = fill_panel_for_group(
                                    ^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 422, in fill_panel_for_group
    fp = FillPanel(
         ^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 577, in __init__
    self.add_items(content, panel, self.sizer)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/ui_panel.py", line 932, in add_items
    editor.prepare(item_panel)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/editor.py", line 251, in prepare
    self.init(parent)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/animated_gif_editor.py", line 39, in init
    self.control = GenericAnimationCtrl(parent, -1, self._animate)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wx._core.wxAssertionError: C++ assertion ""animation.IsCompatibleWith(GetClassInfo())"" failed at ../src/generic/animateg.cpp(257) in SetAnimation(): incompatible animation

======================================================================
FAIL: test_radio_enum_none_selected (traitsui.tests.editors.test_enum_editor.TestRadioEnumEditor.test_radio_enum_none_selected)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_enum_editor.py", line 385, in test_radio_enum_none_selected
    self.assertEqual(displayed, None)
AssertionError: 'One' != None

======================================================================
FAIL: test_show_file_dialog (traitsui.tests.editors.test_file_editor.TestSimpleFileEditor.test_show_file_dialog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/mock.py", line 1369, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_file_editor.py", line 131, in test_show_file_dialog
    self.assertEqual(editor.value, "some_file.txt")
AssertionError: '' != 'some_file.txt'
+ some_file.txt

======================================================================
FAIL: test_show_file_dialog_truncate_ext (traitsui.tests.editors.test_file_editor.TestSimpleFileEditor.test_show_file_dialog_truncate_ext)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.11/unittest/mock.py", line 1369, in patched
    return func(*newargs, **newkeywargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_file_editor.py", line 149, in test_show_file_dialog_truncate_ext
    self.assertEqual(editor.value, "some_file")
AssertionError: '' != 'some_file'
+ some_file

======================================================================
FAIL: test_custom_editor_with_selection (traitsui.tests.editors.test_instance_editor.TestInstanceEditor.test_custom_editor_with_selection)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_instance_editor.py", line 185, in test_custom_editor_with_selection
    text = instance.inspect(SelectedText())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 274, in inspect
    return self._perform_or_inspect(interaction)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 313, in _perform_or_inspect
    return handler(self, interaction)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/_ui_tester_registry/wx/_traitsui/instance_editor.py", line 69, in _get_choice_text
    return control.GetString(control.GetSelection())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wx._core.wxAssertionError: C++ assertion ""Assert failure"" failed at ../src/gtk/choice.cpp(296) in GetString(): invalid index

======================================================================
FAIL: test_custom_editor_with_selection_change_option_name (traitsui.tests.editors.test_instance_editor.TestInstanceEditor.test_custom_editor_with_selection_change_option_name)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_instance_editor.py", line 233, in test_custom_editor_with_selection_change_option_name
    self.assertEqual(text, "Something New")
AssertionError: 'one' != 'Something New'
- one
+ Something New


======================================================================
FAIL: test_none_selected (traitsui.tests.editors.test_instance_editor.TestInstanceEditor.test_none_selected)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_instance_editor.py", line 365, in test_none_selected
    text = instance.inspect(SelectedText())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 274, in inspect
    return self._perform_or_inspect(interaction)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_wrapper.py", line 313, in _perform_or_inspect
    return handler(self, interaction)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/_ui_tester_registry/wx/_traitsui/instance_editor.py", line 69, in _get_choice_text
    return control.GetString(control.GetSelection())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
wx._core.wxAssertionError: C++ assertion ""Assert failure"" failed at ../src/gtk/choice.cpp(296) in GetString(): invalid index

======================================================================
FAIL: test_wx_list_str_multi_selected_index (traitsui.tests.editors.test_liststr_editor_selection.TestListStrEditorSelection.test_wx_list_str_multi_selected_index)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_liststr_editor_selection.py", line 727, in test_wx_list_str_multi_selected_index
    with reraise_exceptions(), create_ui(
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 123, in create_ui
    process_cascade_events()
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/_gui.py", line 42, in process_cascade_events
    GUI.process_events()
  File "/usr/lib/python3.11/site-packages/pyface/ui/wx/gui.py", line 79, in process_events
    wx.GetApp().Yield(True)
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ../src/common/wincmn.cpp(473) in ~wxWindowBase(): any pushed event handlers must have been removed

======================================================================
FAIL: test_wx_list_str_selected_index (traitsui.tests.editors.test_liststr_editor_selection.TestListStrEditorSelection.test_wx_list_str_selected_index)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_liststr_editor_selection.py", line 704, in test_wx_list_str_selected_index
    with reraise_exceptions(), create_ui(
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 123, in create_ui
    process_cascade_events()
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/_gui.py", line 42, in process_cascade_events
    GUI.process_events()
  File "/usr/lib/python3.11/site-packages/pyface/ui/wx/gui.py", line 79, in process_events
    wx.GetApp().Yield(True)
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ../src/common/wincmn.cpp(473) in ~wxWindowBase(): any pushed event handlers must have been removed

======================================================================
FAIL: test_range_text_editor_set_with_text_valid (traitsui.tests.editors.test_range_editor.TestRangeEditor.test_range_text_editor_set_with_text_valid)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_range_editor.py", line 165, in test_range_text_editor_set_with_text_valid
    self.assertEqual(model.value, 10)
AssertionError: 1 != 10

======================================================================
FAIL: test_custom_auto_set_false_do_not_update_wx (traitsui.tests.editors.test_text_editor.TestTextEditor.test_custom_auto_set_false_do_not_update_wx)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_text_editor.py", line 305, in test_custom_auto_set_false_do_not_update_wx
    self.assertEqual(foo.name, "")
AssertionError: 'N' != ''
- N
+ 


======================================================================
FAIL: test_simple_auto_set_false_do_not_update_wx (traitsui.tests.editors.test_text_editor.TestTextEditor.test_simple_auto_set_false_do_not_update_wx)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/editors/test_text_editor.py", line 251, in test_simple_auto_set_false_do_not_update_wx
    self.assertEqual(foo.name, "")
AssertionError: 'N' != ''
- N
+ 


======================================================================
FAIL: test_all_resizable_with_labels (traitsui.tests.test_labels.TestAnyToolkit.test_all_resizable_with_labels)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/tests/test_labels.py", line 238, in test_all_resizable_with_labels
    with reraise_exceptions(), create_ui(VResizeTestDialog()):
  File "/usr/lib64/python3.11/contextlib.py", line 144, in __exit__
    next(self.gen)
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/tester/ui_tester.py", line 116, in create_ui
    process_cascade_events()
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/testing/_gui.py", line 42, in process_cascade_events
    GUI.process_events()
  File "/usr/lib/python3.11/site-packages/pyface/ui/wx/gui.py", line 79, in process_events
    wx.GetApp().Yield(True)
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ../src/common/wincmn.cpp(473) in ~wxWindowBase(): any pushed event handlers must have been removed

======================================================================
FAIL: test_traits_font_reduce (traitsui.wx.tests.test_font_trait.TestWxFont.test_traits_font_reduce)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/tests/test_font_trait.py", line 156, in test_traits_font_reduce
    self.assertEqual(
AssertionError: Tuples differ: (<fun[35 chars]acdf80>, ('18 point swiss Comic Sans Oblique Bold underline',)) != (<fun[35 chars]acdf80>, ('18 point Comic Sans Oblique Bold underline',))

First differing element 1:
('18 point swiss Comic Sans Oblique Bold underline',)
('18 point Comic Sans Oblique Bold underline',)

  (<function create_traitsfont at 0x7f0ea3acdf80>,
-  ('18 point swiss Comic Sans Oblique Bold underline',))
?             ------

+  ('18 point Comic Sans Oblique Bold underline',))

======================================================================
FAIL: test_traits_font_str (traitsui.wx.tests.test_font_trait.TestWxFont.test_traits_font_str)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/BUILDROOT/python-traitsui-8.0.0-1.fc39.x86_64/usr/lib/python3.11/site-packages/traitsui/wx/tests/test_font_trait.py", line 171, in test_traits_font_str
    self.assertEqual(
AssertionError: '18 point swiss Comic Sans Oblique Bold underline' != '18 point Comic Sans Oblique Bold underline'
- 18 point swiss Comic Sans Oblique Bold underline
?          ------
+ 18 point Comic Sans Oblique Bold underline


----------------------------------------------------------------------
Ran 664 tests in 8.365s

FAILED (failures=16, errors=6, skipped=215)
Exception ignored in atexit callback: <built-in function _wxPyCleanup>
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ../src/common/wincmn.cpp(473) in ~wxWindowBase(): any pushed event handlers must have been removed

Test run with:

+ export QT_API=wx
+ QT_API=wx
+ case $toolkit in
+ export ETS_TOOLKIT=wx
+ ETS_TOOLKIT=wx
+ unset QT_API
+ export EXCLUDE_TESTS=qt
+ EXCLUDE_TESTS=qt
+ xvfb-run /usr/bin/python3 -s -X faulthandler -W default -m unittest discover -v traitsui
@corranwebster
Copy link
Contributor

Thanks for the report. Which version of wxPython are you using?

@opoplawski
Copy link
Contributor Author

wxpython 4.2.1 it seems. wxGTK 3.2.2

@corranwebster
Copy link
Contributor

Unfortunately we're having trouble running the WxPython tests on Linux in CI, as there are no easily pip-installable builds of recent Wx releases that are usable with recent Python and the Github runners, so it's not entirely surprising that there are issues. That said, I think that the Windows tests are running on 4.2.1, but I might need to do a little digging to make sure that they don't have issues (it's been a few months since I've been in the TraitsUI CI system, so I'm fuzzy on what state things are in).

@corranwebster
Copy link
Contributor

I just ran the test suite on all platforms for Wx, and it looks like we have a lot of failures on latest WxPython on all platforms. We aren't using Wx for anything any more, so likely won't have time to fix anything any time soon.

My only recommendation would be to try older WxPython versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants