diff --git a/28-non-strict-xfail.patch b/28-non-strict-xfail.patch new file mode 100644 index 0000000..f935e96 --- /dev/null +++ b/28-non-strict-xfail.patch @@ -0,0 +1,36 @@ +From 3b8e04a35ed33a7dd89f0194542b22c7bde867f4 Mon Sep 17 00:00:00 2001 +From: Bas Couwenberg +Date: Sat, 25 Nov 2023 14:54:52 +0100 +Subject: [PATCH] Use non-strict xfail for failing tests. + +Ref: #27 +--- + test_snuggs.py | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/test_snuggs.py ++++ b/test_snuggs.py +@@ -191,6 +191,7 @@ def test_masked_arr(): + + + # Parse and syntax error testing. ++@pytest.mark.xfail(strict=False, reason="https://github.com/mapbox/snuggs/issues/27") + def test_missing_closing_paren(): + with pytest.raises(SyntaxError) as excinfo: + snuggs.eval("(+ 1 2") +@@ -206,6 +207,7 @@ def test_missing_func(): + assert str(excinfo.value) == "'0' is not a function or operator" + + ++@pytest.mark.xfail(strict=False, reason="https://github.com/mapbox/snuggs/issues/27") + def test_missing_func2(): + with pytest.raises(SyntaxError) as excinfo: + snuggs.eval("(# 1 2)") +@@ -221,6 +223,7 @@ def test_undefined_var(): + assert str(excinfo.value) == "name 'bogus' is not defined" + + ++@pytest.mark.xfail(strict=False, reason="https://github.com/mapbox/snuggs/issues/27") + def test_bogus_higher_order_func(): + with pytest.raises(SyntaxError) as excinfo: + snuggs.eval("((bogus * 2) 2)") diff --git a/python-snuggs.changes b/python-snuggs.changes index 1ffcc70..1cfb6ec 100644 --- a/python-snuggs.changes +++ b/python-snuggs.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Nov 25 17:05:15 UTC 2023 - Matej Cepl + +- Add 28-non-strict-xfail.patch synchronizing skipping of failing + tests with Debian. + ------------------------------------------------------------------- Sat Sep 9 14:51:16 UTC 2023 - Matej Cepl diff --git a/python-snuggs.spec b/python-snuggs.spec index a26f734..3fed820 100644 --- a/python-snuggs.spec +++ b/python-snuggs.spec @@ -25,6 +25,9 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/mapbox/snuggs Source: https://files.pythonhosted.org/packages/source/s/snuggs/snuggs-%{version}.tar.gz +# PATCH-FIX-UPSTREAM 28-non-strict-xfail.patch gh#mapbox/snuggs#27 mcepl@suse.com +# synchronize skipping of failing tests with Debian +Patch0: 28-non-strict-xfail.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module wheel} BuildRequires: fdupes @@ -54,8 +57,7 @@ Snuggs are s-expressions for Numpy. %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# gh#mapbox/snuggs#27 -%pytest -k 'not (test_missing_closing_paren or test_missing_func2 or test_bogus_higher_order_func)' test_snuggs.py +%pytest test_snuggs.py %files %{python_files} %doc AUTHORS.txt CHANGES.txt README.rst