[Debian-med-packaging] Bug#912586: python-cobra still fails it's autopkg tests
Andreas Tille
andreas at fam-tille.de
Sat Dec 22 07:56:29 GMT 2018
Control: tags -1 help
Hi,
I tried to find the reason for the autopkgtest failure. It is running
the same tests as on build time. These tests are fine:
cobra/test/test_manipulation.py ........... [ 14%]
cobra/test/test_medium.py .............. [ 32%]
cobra/test/test_io/test_io_order.py ........................... [ 68%]
cobra/test/test_io/test_json.py x.x [ 72%]
cobra/test/test_io/test_mat.py ss [ 75%]
cobra/test/test_io/test_pickle.py .s.s [ 80%]
cobra/test/test_io/test_sbml.py sss [ 84%]
cobra/test/test_io/test_sbml3.py .......... [ 97%]
cobra/test/test_io/test_yaml.py .x [100%]
However, if I install python3-cobra on my local machine and do
cd python-cobra/debian/tests/
make py3-test | grep -i fail
../../cobra/test/test_io/test_json.py::test_validate_json <- ../../../../../../usr/lib/python3/dist-packages/cobra/test/test_io/test_json.py xfail [ 69%]
../../cobra/test/test_io/test_json.py::test_save_json_model <- ../../../../../../usr/lib/python3/dist-packages/cobra/test/test_io/test_json.py xfail [ 72%]
../../cobra/test/test_io/test_yaml.py::test_save_yaml_model <- ../../../../../../usr/lib/python3/dist-packages/cobra/test/test_io/test_yaml.py xfail [100%]
=============== 64 passed, 9 skipped, 3 xfailed in 14.10 seconds ===============
I checked the relevant test sources
$ grep -B1 -A3 test_validate_json cobra/test/test_io/test_json.py
@pytest.mark.xfail(reason="schema outdated")
def test_validate_json(data_directory):
"""Validate file according to JSON-schema."""
jsonschema = pytest.importorskip("jsonschema")
with open(join(data_directory, "mini.json"),
$ grep -B1 -A3 test_save_json_model cobra/test/test_io/test_json.py
@pytest.mark.xfail(reason="schema outdated")
def test_save_json_model(tmpdir, mini_model):
"""Test the writing of JSON model."""
jsonschema = pytest.importorskip("jsonschema")
output_file = tmpdir.join("mini.json")
$ grep -B1 -A3 test_save_yaml_model cobra/test/test_io/test_yaml.py
@pytest.mark.xfail(reason="schema outdated")
def test_save_yaml_model(tmpdir, mini_model):
jsonschema = pytest.importorskip("jsonschema")
"""Test the writing of YAML model."""
output_file = tmpdir.join("mini.yml")
all test failures seem to be caused by outdated schemas. Unfortunately
I have no idea what schema is searched for and why it is valid at package
build time while outdated on installed machine.
I somehow suspect that the problem is
jsonschema = pytest.importorskip("jsonschema")
which is unique to all these three failing tests (and does not occure in
any other test).
Does anybody have a clue?
Kind regards
Andreas.
--
http://fam-tille.de
More information about the Debian-med-packaging
mailing list