[med-svn] [Git][med-team/python-cobra][master] 2 commits: pytest.mark.skip did not worked that way. :-(

Andreas Tille gitlab at salsa.debian.org
Wed Sep 30 17:15:37 BST 2020



Andreas Tille pushed to branch master at Debian Med / python-cobra


Commits:
7424aec4 by Andreas Tille at 2020-09-30T17:37:13+02:00
pytest.mark.skip did not worked that way. :-(

- - - - -
6fb4e53a by Andreas Tille at 2020-09-30T18:09:54+02:00
Really exclude tests requiring importlib_resources

- - - - -


1 changed file:

- debian/patches/no_importlib_resources_for_test.patch


Changes:

=====================================
debian/patches/no_importlib_resources_for_test.patch
=====================================
@@ -14,7 +14,7 @@ Description: importlib_resources is not packaged for Debian thus ignore the test
  	pandas ~= 1.0
 --- a/src/cobra/test/test_io/test_json.py
 +++ b/src/cobra/test/test_io/test_json.py
-@@ -8,12 +8,12 @@ import json
+@@ -8,19 +8,19 @@ import json
  from os.path import join
  
  import pytest
@@ -25,10 +25,30 @@ Description: importlib_resources is not packaged for Debian thus ignore the test
  from cobra.test.test_io.conftest import compare_models
  
 -
+- at pytest.fixture(scope="module")
+-def json_schema_v1():
+-    with open_text(cio, "schema_v1.json") as handle:
+-        schema_v1 = json.load(handle)
+-    return schema_v1
++#@pytest.fixture(scope="module")
++#def json_schema_v1():
++#    with open_text(cio, "schema_v1.json") as handle:
++#        schema_v1 = json.load(handle)
++#    return schema_v1
+ 
+ 
++ at pytest.mark.skip(reason="importlib_resources not packaged for Debian")
+ def test_validate_json(data_directory, json_schema_v1):
+     """Validate file according to JSON-schema."""
+     jsonschema = pytest.importorskip("jsonschema")
+@@ -35,6 +35,7 @@ def test_load_json_model(data_directory,
+     assert compare_models(mini_model, json_model) is None
+ 
+ 
 + at pytest.mark.skip(reason="importlib_resources not packaged for Debian")
- @pytest.fixture(scope="module")
- def json_schema_v1():
-     with open_text(cio, "schema_v1.json") as handle:
+ def test_save_json_model(tmpdir, mini_model, json_schema_v1):
+     """Test the writing of JSON model."""
+     jsonschema = pytest.importorskip("jsonschema")
 --- a/tox.ini
 +++ b/tox.ini
 @@ -90,7 +90,6 @@ known_first_party = cobra



View it on GitLab: https://salsa.debian.org/med-team/python-cobra/-/compare/48b34d8b854d09a7b6f0a50688917a7a06af9e8e...6fb4e53a1e36b1af1d16b52ad610c696f79414a3

-- 
View it on GitLab: https://salsa.debian.org/med-team/python-cobra/-/compare/48b34d8b854d09a7b6f0a50688917a7a06af9e8e...6fb4e53a1e36b1af1d16b52ad610c696f79414a3
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200930/f695203c/attachment-0001.html>


More information about the debian-med-commit mailing list