Accepting request 956659 from devel:languages:python
- Add patch skip-tests-expat-245.patch: * Do not run tests that make no sense with a current Expat. OBS-URL: https://build.opensuse.org/request/show/956659 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-xmltodict?expand=0&rev=6
This commit is contained in:
commit
636c370f70
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 22 10:27:36 UTC 2022 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Add patch skip-tests-expat-245.patch:
|
||||
* Do not run tests that make no sense with a current Expat.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 29 10:34:50 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-xmltodict
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -22,9 +22,9 @@ Version: 0.12.0
|
||||
Release: 0
|
||||
Summary: Module to make XML working resemble JSON
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/martinblech/xmltodict
|
||||
Source: https://files.pythonhosted.org/packages/source/x/xmltodict/xmltodict-%{version}.tar.gz
|
||||
Patch0: skip-tests-expat-245.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module xml}
|
||||
BuildRequires: fdupes
|
||||
@ -40,7 +40,7 @@ working with json, as in this:
|
||||
http://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html
|
||||
|
||||
%prep
|
||||
%setup -q -n xmltodict-%{version}
|
||||
%autosetup -p1 -n xmltodict-%{version}
|
||||
sed -i '1{\@^#!%{_bindir}/env python@d}' xmltodict.py
|
||||
|
||||
%build
|
||||
|
28
skip-tests-expat-245.patch
Normal file
28
skip-tests-expat-245.patch
Normal file
@ -0,0 +1,28 @@
|
||||
Index: xmltodict-0.12.0/tests/test_xmltodict.py
|
||||
===================================================================
|
||||
--- xmltodict-0.12.0.orig/tests/test_xmltodict.py
|
||||
+++ xmltodict-0.12.0/tests/test_xmltodict.py
|
||||
@@ -8,6 +8,7 @@ except ImportError:
|
||||
|
||||
from xml.parsers.expat import ParserCreate
|
||||
from xml.parsers import expat
|
||||
+import pyexpat
|
||||
|
||||
|
||||
def _encode(s):
|
||||
@@ -167,6 +168,7 @@ class XMLToDictTestCase(unittest.TestCas
|
||||
self.assertEqual(parse(xml),
|
||||
parse(xml.encode('utf-8')))
|
||||
|
||||
+ @unittest.skipIf(pyexpat.version_info >= (2, 4, 5), reason="Makes no sense with current Expat")
|
||||
def test_namespace_support(self):
|
||||
xml = """
|
||||
<root xmlns="http://defaultns.com/"
|
||||
@@ -195,6 +197,7 @@ class XMLToDictTestCase(unittest.TestCas
|
||||
res = parse(xml, process_namespaces=True)
|
||||
self.assertEqual(res, d)
|
||||
|
||||
+ @unittest.skipIf(pyexpat.version_info >= (2, 4, 5), reason="Makes no sense with current Expat")
|
||||
def test_namespace_collapse(self):
|
||||
xml = """
|
||||
<root xmlns="http://defaultns.com/"
|
Loading…
Reference in New Issue
Block a user