[opensuse-python] Need help fix test failed for python-ncempy
Hello, I am trying to package openNCEM to openSUSE TW. This is my repo to build python-ncempy. https://build.opensuse.org/package/show/home:andythe_great/python-ncempy-git I could not get it to pass the test. I have been asking the dev, but we still currently not able to fix it. https://github.com/ercius/openNCEM/issues/22 We guess that the test failed because genfire is importing GUI element in to OBS headless server which cause it to fail. [ 112s] ====================================================================== [ 112s] ERROR: DoGenfire (unittest.loader._FailedTest) [ 112s] ---------------------------------------------------------------------- [ 112s] ImportError: Failed to import test module: DoGenfire [ 112s] Traceback (most recent call last): [ 112s] File "/usr/lib64/python3.8/unittest/loader.py", line 154, in loadTestsFromName [ 112s] module = __import__(module_name) [ 112s] File "/home/abuild/rpmbuild/BUILD/openNCEM-master/ncempy/edstomo/DoGenfire.py", line 2, in <module> [ 112s] from genfire import reconstruct, fileio [ 112s] File "/usr/lib/python3.8/site-packages/genfire/__init__.py", line 2, in <module> [ 112s] from . import reconstruct [ 112s] File "/usr/lib/python3.8/site-packages/genfire/reconstruct.py", line 16, in <module> [ 112s] matplotlib.use("Qt5Agg") [ 112s] File "/usr/lib64/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 296, in wrapper [ 112s] return func(*args, **kwargs) [ 112s] File "/usr/lib64/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 358, in wrapper [ 112s] return func(*args, **kwargs) [ 112s] File "/usr/lib64/python3.8/site-packages/matplotlib/__init__.py", line 1281, in use [ 112s] plt.switch_backend(name) [ 112s] File "/usr/lib64/python3.8/site-packages/matplotlib/pyplot.py", line 234, in switch_backend [ 112s] raise ImportError( [ 112s] ImportError: Cannot load backend 'Qt5Agg' which requires the 'qt5' interactive framework, as 'headless' is currently running [ 112s] [ 112s] [ 112s] ---------------------------------------------------------------------- Thanks. -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
Hi, Am 27.05.20 um 00:17 schrieb andythe_great:
Hello,
I am trying to package openNCEM to openSUSE TW. This is my repo to build python-ncempy. https://build.opensuse.org/package/show/home:andythe_great/python-ncempy-git
I could not get it to pass the test. I have been asking the dev, but we still currently not able to fix it.
https://github.com/ercius/openNCEM/issues/22
We guess that the test failed because genfire is importing GUI element in to OBS headless server which cause it to fail.
You can use Xvfb if you have to test GUI elements in OBS. I sent you an SR for the package using the pytest-xvfb plugin. Another option is to use xvfb-run with nosetests, but ncempy does not seem to rely on nose vs pytest. setup.py test is deprecated by setuptools. With that out of the way you will have to fix the next problem: - test_io looks for a Windows filepath. Obviously not suitable for a Linux package in OBS - The README in the test dir says you need a big chunk of real data. I don't think you can upload that to OBS. Cheers, Ben -- To unsubscribe, e-mail: opensuse-python+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-python+owner@opensuse.org
participants (2)
-
andythe_great
-
Ben Greiner