andreikop / enki

A text editor for programmers
http://enki-editor.org
GNU General Public License v2.0
161 stars 38 forks source link

Travis tests are failing - no module named 'sip' #454

Closed abitrolly closed 5 years ago

abitrolly commented 5 years ago

https://travis-ci.org/andreikop/enki/jobs/432500468#L830

======================================================================
ERROR: test_base (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: test_base
Traceback (most recent call last):
  File "/opt/python/3.5.6/lib/python3.5/unittest/loader.py", line 428, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/python/3.5.6/lib/python3.5/unittest/loader.py", line 369, in _get_module_from_name
    __import__(name)
  File "/home/travis/build/andreikop/enki/tests/test_base.py", line 22, in <module>
    import base
  File "/home/travis/build/andreikop/enki/tests/base.py", line 17, in <module>
    import sip
ImportError: No module named 'sip'

I guess it should be easy to fix by finding missing dependency. However, I am not sure why it is missing if it is a part of PyQt5, Perhaps PyQt5 is not installed?

bjones1 commented 5 years ago

The location has changed in recently PyQt5 versions -- it's PyQt5.sip instead of sip now.

andreikop commented 5 years ago

I gave up supporting tests on CI. They usually fail due of infrastructure problems, not because of code problems. Deactivated Travis to not to get anybody confused about it.

abitrolly commented 5 years ago

Running tests and failing them is better than not running them at all. I would prefer failed Travis tests so that more people can contribute patches to fix them.

andreikop commented 5 years ago

After multiple attempts to fix the tests I've decided it doesn't make sense. The tests mostly fail not because of bugs in the code, but because PyQt crashes when running tests. More often on headless X server.

abitrolly commented 5 years ago

Which only proves that Enki is a good codebase to test PyQt5. :D Maybe write to https://www.riverbankcomputing.com/mailman/listinfo/pyqt/ to raise the issue?

I could help write the message stating the problem with quality of support for CI and headless GUI testing, but I lack the necessary knowledge and details about the build process. I still can setup CI for Riverbank if they need to do so.