enthought / pyface

pyface: traits-capable windowing framework
Other
105 stars 55 forks source link

Test failure on Fedora rawhide #1118

Closed opoplawski closed 2 years ago

opoplawski commented 2 years ago

Trying to update the Fedora pyface package to 7.4.1 I'm getting the following test failure:

ERROR: test_from_toolkit_typical (pyface.tests.test_font.TestFont)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/rpmbuild/BUILDROOT/python-pyface-7.4.1-1.fc37.x86_64/usr/lib/python3.10/site-packages/pyface/tests/test_font.py", line 268, in test_from_toolkit_typical
    result = Font.from_toolkit(font.to_toolkit())
  File "/home/orion/rpmbuild/BUILDROOT/python-pyface-7.4.1-1.fc37.x86_64/usr/lib/python3.10/site-packages/pyface/font.py", line 368, in to_toolkit
    return font_to_toolkit_font(self)
  File "/home/orion/rpmbuild/BUILDROOT/python-pyface-7.4.1-1.fc37.x86_64/usr/lib/python3.10/site-packages/pyface/ui/wx/font.py", line 132, in font_to_toolkit_font
    wx_font = wx.Font(size, default_family, style, weight, underline)
TypeError: Font(): arguments did not match any overloaded call:
  overload 1: too many arguments
  overload 2: argument 1 has unexpected type 'float'
  overload 3: argument 1 has unexpected type 'float'
  overload 4: argument 1 has unexpected type 'float'
  overload 5: argument 1 has unexpected type 'float'
  overload 6: argument 1 has unexpected type 'float'
  overload 7: argument 1 has unexpected type 'float'

This is with python3-wxpython4-4.0.7-28.fc37.x86_64

opoplawski commented 2 years ago

Similar with pyqt5:

ERROR: test_from_toolkit_typical (pyface.tests.test_font.TestFont)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/orion/rpmbuild/BUILDROOT/python-pyface-7.4.1-1.fc37.x86_64/usr/lib/python3.10/site-packages/pyface/tests/test_font.py", line 268, in test_from_toolkit_typical
    result = Font.from_toolkit(font.to_toolkit())
  File "/home/orion/rpmbuild/BUILDROOT/python-pyface-7.4.1-1.fc37.x86_64/usr/lib/python3.10/site-packages/pyface/font.py", line 368, in to_toolkit
    return font_to_toolkit_font(self)
  File "/home/orion/rpmbuild/BUILDROOT/python-pyface-7.4.1-1.fc37.x86_64/usr/lib/python3.10/site-packages/pyface/ui/qt4/font.py", line 117, in font_to_toolkit_font
    qt_font.setStretch(font.stretch)
TypeError: setStretch(self, int): argument 1 has unexpected type 'float'
opoplawski commented 2 years ago

I think this was ultimately due to how the tests were being run. I've reworked that it things look better.