nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.53k stars 130 forks source link

Test suite quite broken #449

Closed mcepl closed 3 years ago

mcepl commented 3 years ago

When packaging this package for openSUSE (version 0.13.0) we have many tests which error, when running.

See complete build log for list of all packages used and steps taken to get there (basically just running pytest with exclusion couple of tests failing, see #397).

Do we do something wrong or is the test suite really so broken?

MatthieuDartiailh commented 3 years ago

While preparing support for Python 3.10 I stopped testing on 3.6. Out of curiosity do you see the same issue with more recent version of Python ? If you look at the Github actions log you will see the testsuite is expected to pass. Note that I had to disable the focus tests on linux due to my incapacity of setting up a window manager handling those properly. I can try to reactivate testing on 3.6 but I do not really fancy it.

mcepl commented 3 years ago

Most of the problems are errors, which don't give good error messages, but I've got this failure (with Python 3.9.5, ):

[   53s] + pytest-3.9 --ignore=_build. --ignore=_build.python39 --ignore=_build.python38 -v tests -k 'not (test_focus_tracking or test_focus_traversal)'
[   55s] ============================= test session starts ==============================
[   55s] platform linux -- Python 3.9.5, pytest-6.2.4, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3.9
[   55s] cachedir: .pytest_cache
[   55s] PyQt5 5.15.4 -- Qt runtime 5.15.2 -- Qt compiled 5.15.2
[   55s] rootdir: /home/abuild/rpmbuild/BUILD/enaml-0.13.0
[   55s] plugins: qt-4.0.2, xvfb-2.0.0
[   56s] collecting ... collected 4197 items / 4 deselected / 4193 selected
[   56s]
...
[   69s] ________________________________________________________________________________
[   69s] Traceback (most recent call last):
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/qt/q_deferred_caller.py", line 42, in customEvent
[   69s]     event.callback(*event.args, **event.kwargs)
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/widgets/toolkit_object.py", line 169, in destroy
[   69s]     super(ToolkitObject, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/styling.py", line 298, in destroy
[   69s]     super(Stylable, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/core/declarative.py", line 128, in destroy
[   69s]     super(Declarative, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/core/object.py", line 114, in destroy
[   69s]     child.destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/widgets/toolkit_object.py", line 169, in destroy
[   69s]     super(ToolkitObject, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/styling.py", line 298, in destroy
[   69s]     super(Stylable, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/core/declarative.py", line 128, in destroy
[   69s]     super(Declarative, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/core/object.py", line 114, in destroy
[   69s]     child.destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/widgets/toolkit_object.py", line 172, in destroy
[   69s]     self.proxy.destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/qt/qt_constraints_widget.py", line 46, in destroy
[   69s]     super(QtConstraintsWidget, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/qt/qt_widget.py", line 95, in destroy
[   69s]     super(QtWidget, self).destroy()
[   69s]   File "/home/abuild/rpmbuild/BUILD/enaml-0.13.0/build/testlib/enaml/qt/qt_toolkit_object.py", line 93, in destroy
[   69s]     widget.setParent(None)
[   69s] RuntimeError: wrapped C/C++ object of type QLabel has been deleted
[   69s] ________________________________________________________________________________
[   69s] FAILED [  2%]

Which version of Qt library you support?

MatthieuDartiailh commented 3 years ago

Sorry I did not notice it right away but since you are building 0.13.0 and not main you need to pin pytest-qt to version 3. Version 4 made some argument keyword only which broke the test suite. The issue has been addressed in main but I have no time to make a release. I will likely do it after 3.10 final release but I still need to unable pyqt tests on 3.10.

mcepl commented 3 years ago

Right, upgrade to enaml-0.13.0+git.1627388100.6864e8bc.tar.gz (commit 6864e8bc) seems to help. Thank you.

MatthieuDartiailh commented 3 years ago

Thank you for building the OpenSUSE packages.