fabio
fabio copied to clipboard
test failure when the network is not reachable.
Hello, when building fabio, the test gives some errors because it try to download a bunch of files.
It would be nice if these test could be skipped.
thanks
Fred
======================================================================
ERROR: test_read (fabio.test.testmpaimage.TestMpa)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/<<BUILDDIR>>/python-fabio-0.5.0+dfsg/.pybuild/pythonX.Y_2.7/build/fabio/test/testmpaimage.py", line 54, in test_read
path = UtilsTest.getimage(name + ".bz2")[:-4]
File "/<<BUILDDIR>>/python-fabio-0.5.0+dfsg/.pybuild/pythonX.Y_2.7/build/fabio/test/utilstest.py", line 186, in getimage
data=None, timeout=cls.timeout).read()
File "/usr/lib/python2.7/urllib2.py", line 429, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 447, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1228, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1198, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 111] Connection refused>
Did you create the testimages archive?
Tests on MPA are new, then maybe i also did it wrong somewhere.
No , there is no test images in the pip sources. And this is now the upstream sources for python packages
All our tests are based on a butch of files provided by our www.silx.org. We provide a way to test an archive for offline testing. But i push a patch else the script is broken https://github.com/silx-kit/fabio/pull/155. You can generate it like that.
rm -rf build testimages all_testimages.json
python setup.py build test testimages
ls dist -al
-rw-r--r-- 1 valls valls 257730382 Sep 7 14:31 fabio-testimages.tar.gz
I don't think it is a good idea to skip resources, while all our tests are based on this resources. If you don't have it, you don't test the library.
I agreed bu the size of this file is so big that I prefer not to upload this each time in Debian... Maybe we could have a dedicated package for all the data required by the silx project.
What is possible is to run the ets with network in the ci of debian. Because it is possible to run with network on ci.Debian.net.
For now, I unactivated the test during the build.
Do you still need tools to build the tarball with all images ? Since we moved to Meson, this tool would need to be re-written (outside setup.py)