forked from pool/python-xmlschema
- Add skip_network_tests.patch to skip test
test_export_remote__issue_187 which fails without the network connection (gh#sissaschool/xmlschema#206). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmlschema?expand=0&rev=18
This commit is contained in:
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 11 16:18:52 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Add skip_network_tests.patch to skip test
|
||||||
|
test_export_remote__issue_187 which fails without the network
|
||||||
|
connection (gh#sissaschool/xmlschema#206).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Oct 10 10:28:03 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
Sat Oct 10 10:28:03 UTC 2020 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@@ -25,6 +25,9 @@ Summary: An XML Schema validator and decoder
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/brunato/xmlschema
|
URL: https://github.com/brunato/xmlschema
|
||||||
Source: https://files.pythonhosted.org/packages/source/x/xmlschema/xmlschema-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/x/xmlschema/xmlschema-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM skip_network_tests.patch gh#sissaschool/xmlschema#206 mcepl@suse.com
|
||||||
|
# Just skip test_export_remote__issue_187 test when not connected to the network.
|
||||||
|
Patch0: skip_network_tests.patch
|
||||||
BuildRequires: %{python_module elementpath >= 1.4.0}
|
BuildRequires: %{python_module elementpath >= 1.4.0}
|
||||||
BuildRequires: %{python_module lxml}
|
BuildRequires: %{python_module lxml}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
@@ -43,7 +46,8 @@ The *xmlschema* library is an implementation of `XML Schema <http://www.w3.org/2
|
|||||||
for Python.
|
for Python.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n xmlschema-%{version}
|
%autosetup -p1 -n xmlschema-%{version}
|
||||||
|
|
||||||
# do not hardcode versions
|
# do not hardcode versions
|
||||||
sed -i -e 's:~=:>=:' setup.py
|
sed -i -e 's:~=:>=:' setup.py
|
||||||
# do not bother with memory validation
|
# do not bother with memory validation
|
||||||
@@ -66,9 +70,8 @@ done
|
|||||||
%check
|
%check
|
||||||
# test_element_tree_import_script is (easily workaroundable) https://github.com/sissaschool/xmlschema/issues/167
|
# test_element_tree_import_script is (easily workaroundable) https://github.com/sissaschool/xmlschema/issues/167
|
||||||
# tests_factory setup is broken
|
# tests_factory setup is broken
|
||||||
# test_export_remote__issue_187 is gh#sissaschool/xmlschema#206
|
|
||||||
export LANG="en_US.UTF8"
|
export LANG="en_US.UTF8"
|
||||||
%pytest -k "not (test_element_tree_import_script or tests_factory or test_export_remote__issue_187)" tests
|
%pytest -k "not (test_element_tree_import_script or tests_factory)" tests
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative xmlschema-json2xml
|
%python_install_alternative xmlschema-json2xml
|
||||||
|
10
skip_network_tests.patch
Normal file
10
skip_network_tests.patch
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
--- a/tests/validators/test_schema_class.py
|
||||||
|
+++ b/tests/validators/test_schema_class.py
|
||||||
|
@@ -261,6 +261,7 @@ class TestXMLSchema10(XsdValidatorTestCa
|
||||||
|
|
||||||
|
self.assertFalse(os.path.isdir(dirname))
|
||||||
|
|
||||||
|
+ @unittest.skipIf(SKIP_REMOTE_TESTS, "Remote networks are not accessible.")
|
||||||
|
def test_export_remote__issue_187(self):
|
||||||
|
vh_schema_file = self.casepath('issues/issue_187/issue_187_2.xsd')
|
||||||
|
vh_schema = self.schema_class(vh_schema_file)
|
Reference in New Issue
Block a user