From 44cd312eed2a3132ef2ac51bd289eb955ef1f9e99826a9912462c2f42e88c2a5 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Mon, 27 Sep 2021 03:04:16 +0000 Subject: [PATCH] - Add patch remove-nose.patch: * Remove use of nose in the tests. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jmespath?expand=0&rev=42 --- python-jmespath.changes | 6 ++++++ python-jmespath.spec | 4 ++-- remove-nose.patch | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 remove-nose.patch diff --git a/python-jmespath.changes b/python-jmespath.changes index b25b893..7d230ca 100644 --- a/python-jmespath.changes +++ b/python-jmespath.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Sep 27 03:03:07 UTC 2021 - Steve Kowalik + +- Add patch remove-nose.patch: + * Remove use of nose in the tests. + ------------------------------------------------------------------- Mon May 31 08:00:06 UTC 2021 - pgajdos@suse.com diff --git a/python-jmespath.spec b/python-jmespath.spec index b7d31d2..2f1c0ab 100644 --- a/python-jmespath.spec +++ b/python-jmespath.spec @@ -22,12 +22,11 @@ Version: 0.10.0 Release: 0 Summary: Python module for declarative JSON document element extraction License: MIT -Group: Development/Languages/Python URL: https://github.com/jmespath/jmespath.py Source: https://github.com/jmespath/jmespath.py/archive/refs/tags/%{version}.tar.gz#/jmespath-%{version}.tar.gz +Patch0: remove-nose.patch # Testing BuildRequires: %{python_module hypothesis} -BuildRequires: %{python_module nose} BuildRequires: %{python_module ply >= 3.4} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module simplejson} @@ -73,6 +72,7 @@ The expression: foo.*.name will return ["one", "two"]. %prep %setup -q -n jmespath.py-%{version} +%autopatch -p1 %build %python_build diff --git a/remove-nose.patch b/remove-nose.patch new file mode 100644 index 0000000..f6a9ee1 --- /dev/null +++ b/remove-nose.patch @@ -0,0 +1,34 @@ +Index: jmespath.py-0.10.0/extra/test_hypothesis.py +=================================================================== +--- jmespath.py-0.10.0.orig/extra/test_hypothesis.py ++++ jmespath.py-0.10.0/extra/test_hypothesis.py +@@ -6,7 +6,6 @@ import os + import sys + import numbers + +-from nose.plugins.skip import SkipTest + from hypothesis import given, settings, assume, HealthCheck + import hypothesis.strategies as st + +Index: jmespath.py-0.10.0/tests/test_compliance.py +=================================================================== +--- jmespath.py-0.10.0.orig/tests/test_compliance.py ++++ jmespath.py-0.10.0/tests/test_compliance.py +@@ -3,8 +3,6 @@ from pprint import pformat + from tests import OrderedDict + from tests import json + +-from nose.tools import assert_equal +- + from jmespath.visitor import Options + + +@@ -80,7 +78,7 @@ def _test_expression(given, expression, + actual_repr, pformat(parsed.parsed), + json.dumps(given, indent=4))) + error_msg = error_msg.replace(r'\n', '\n') +- assert_equal(actual, expected, error_msg) ++ assert actual == expected, error_msg + + + def _test_error_expression(given, expression, error, filename):