diff --git a/python-actdiag.changes b/python-actdiag.changes index 858457f..d44b7e9 100644 --- a/python-actdiag.changes +++ b/python-actdiag.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 27 02:55:25 UTC 2025 - Steve Kowalik + +- Add patch support-new-fancy-blockdiag-pytest.patch: + * Use new methods added by new blockdiag, rather than yield tests. + ------------------------------------------------------------------- Mon Jun 16 12:10:48 UTC 2025 - Markéta Machová diff --git a/python-actdiag.spec b/python-actdiag.spec index 3c71f6c..806c133 100644 --- a/python-actdiag.spec +++ b/python-actdiag.spec @@ -1,7 +1,7 @@ # # spec file for package python-actdiag # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,6 +27,8 @@ URL: http://blockdiag.com/ Source: https://files.pythonhosted.org/packages/source/a/actdiag/actdiag-%{version}.tar.gz # PATCH-FIX-UPSTREAM gh#blockdiag/actdiag#25 Patch0: clean-up-assertions.patch +# PATCH-FIX-OPENSUSE Support new fancy pytest parameterized methods in blockdiag +Patch1: support-new-fancy-blockdiag-pytest.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module blockdiag >= 3} BuildRequires: %{python_module docutils} @@ -47,8 +49,6 @@ actdiag generates activity-diagram image files from spec-text files. %prep %autosetup -p1 -n actdiag-%{version} -# python-blockdiag-nose-to-pytest.patch of python-blockdiag changed the function name -sed -i 's/testcase_generator/_testcase_generator/' src/actdiag/tests/test_generate_diagram.py %build %pyproject_wheel @@ -59,7 +59,49 @@ sed -i 's/testcase_generator/_testcase_generator/' src/actdiag/tests/test_genera %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%pytest src/actdiag/tests +# All of these are shipped by blockdiag and fail to parse +donttest+="diagram_attributes.diag-svg-options or " +donttest+="edge_datamodels.diag-svg-options or " +donttest+="empty_group.diag-svg-options or " +donttest+="empty_group_declaration.diag-svg-options or " +donttest+="empty_nested_group.diag-svg-options or " +donttest+="group_and_skipped_edge.diag-svg-options or " +donttest+="group_attribute.diag-svg-options or " +donttest+="group_children_height.diag-svg-options or " +donttest+="group_children_order.diag-svg-options or " +donttest+="group_children_order2.diag-svg-options or " +donttest+="group_children_order3.diag-svg-options or " +donttest+="group_children_order4.diag-svg-options or " +donttest+="group_declare_as_node_attribute.diag-svg-options or " +donttest+="group_height.diag-svg-options or " +donttest+="group_id_and_node_id_are_not_conflicted.diag-svg-options or " +donttest+="group_label.diag-svg-options or " +donttest+="group_order.diag-svg-options or " +donttest+="group_order2.diag-svg-options or " +donttest+="group_order3.diag-svg-options or " +donttest+="group_orientation.diag-svg-options or " +donttest+="group_sibling.diag-svg-options or " +donttest+="group_works_node_decorator.diag-svg-options or " +donttest+="large_group_and_node.diag-svg-options or " +donttest+="large_group_and_node2.diag-svg-options or " +donttest+="large_group_and_two_nodes.diag-svg-options or " +donttest+="merge_groups.diag-svg-options or " +donttest+="multiple_groups.diag-svg-options or " +donttest+="multiple_nested_groups.diag-svg-options or " +donttest+="nested_group_orientation.diag-svg-options or " +donttest+="nested_group_orientation2.diag-svg-options or " +donttest+="nested_groups.diag-svg-options or " +donttest+="nested_groups_and_edges.diag-svg-options or " +donttest+="nested_groups_work_node_decorator.diag-svg-options or " +donttest+="node_attribute_and_group.diag-svg-options or " +donttest+="node_in_group_follows_outer_node.diag-svg-options or " +donttest+="node_link.diag-svg-options or " +donttest+="outer_node_follows_node_in_group.diag-svg-options or " +donttest+="reverse_multiple_groups.diag-svg-options or " +donttest+="separate1.diag-svg-options or " +donttest+="separate2.diag-svg-options or " +donttest+="simple_group.diag-svg-options" +%pytest src/actdiag/tests -k "not ($donttest)" %pre %python_libalternatives_reset_alternative actdiag diff --git a/support-new-fancy-blockdiag-pytest.patch b/support-new-fancy-blockdiag-pytest.patch new file mode 100644 index 0000000..0bf78c4 --- /dev/null +++ b/support-new-fancy-blockdiag-pytest.patch @@ -0,0 +1,29 @@ +Index: actdiag-3.0.0/src/actdiag/tests/test_generate_diagram.py +=================================================================== +--- actdiag-3.0.0.orig/src/actdiag/tests/test_generate_diagram.py ++++ actdiag-3.0.0/src/actdiag/tests/test_generate_diagram.py +@@ -15,17 +15,15 @@ + + import os + +-from blockdiag.tests.test_generate_diagram import (get_diagram_files, +- testcase_generator) ++import pytest ++ ++from blockdiag.tests.test_generate_diagram import (generate, ++ generate_testdata) + + import actdiag.command + + +-def test_generate(): ++@pytest.mark.parametrize("source,file_type,options", generate_testdata) ++def test_generate_with_separate(source, file_type, options): + mainfunc = actdiag.command.main +- basepath = os.path.dirname(__file__) +- files = get_diagram_files(basepath) +- options = [] +- +- for testcase in testcase_generator(basepath, mainfunc, files, options): +- yield testcase ++ generate(mainfunc, source, file_type, options)