From 4166c4ed68b6f1113d4ab5ee9a54d42c40325b5bf42d9e0151fbb3895f4ad061 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 4 Aug 2025 20:20:51 +0000 Subject: [PATCH] - add fix-error-type.patch to fix tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xmldiff?expand=0&rev=23 --- fix-error-type.patch | 13 +++++++++++++ python-xmldiff.changes | 5 +++++ python-xmldiff.spec | 4 +++- 3 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 fix-error-type.patch diff --git a/fix-error-type.patch b/fix-error-type.patch new file mode 100644 index 0000000..9ecf164 --- /dev/null +++ b/fix-error-type.patch @@ -0,0 +1,13 @@ +Index: xmldiff-2.7.0/tests/test_main.py +=================================================================== +--- xmldiff-2.7.0/tests/test_main.py.orig ++++ xmldiff-2.7.0/tests/test_main.py +@@ -44,7 +44,7 @@ class MainAPITests(unittest.TestCase): + with open(LEFT_FILE, "rb") as infile: + with open(RIGHT_FILE, "rb") as infile: + # Give something else, and it fails: +- with self.assertRaises(ValueError): ++ with self.assertRaises(TypeError): + main.diff_texts(infile, infile) + + def test_api_diff_trees(self): diff --git a/python-xmldiff.changes b/python-xmldiff.changes index c2ed6c0..c0672aa 100644 --- a/python-xmldiff.changes +++ b/python-xmldiff.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Aug 1 12:32:54 UTC 2025 - Felix Stegmeier + +- add fix-error-type.patch to fix tests + ------------------------------------------------------------------- Tue Nov 5 14:15:34 UTC 2024 - John Paul Adrian Glaubitz diff --git a/python-xmldiff.spec b/python-xmldiff.spec index add8bae..5700616 100644 --- a/python-xmldiff.spec +++ b/python-xmldiff.spec @@ -1,7 +1,7 @@ # # spec file for package python-xmldiff # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,6 +24,8 @@ Summary: Tree to tree correction between XML documents License: MIT URL: https://github.com/Shoobx/xmldiff Source: https://files.pythonhosted.org/packages/source/x/xmldiff/xmldiff-%{version}.tar.gz +# PATCH-FIX-UPSTREAM fix-error-type.patch taken from https://github.com/Shoobx/xmldiff/commit/57e16ce3d92067c6246c3de04f2d4b9803f6f25b +Patch0: fix-error-type.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel}