forked from pool/python-actdiag
Compare commits
5 Commits
Author | SHA256 | Date | |
---|---|---|---|
41d351e5a7 | |||
faeb53f341 | |||
ad34ea0ef9 | |||
c7e209d993 | |||
c1f68cbf0e |
@@ -1,3 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 27 02:55:25 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- 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á <mmachova@suse.com>
|
||||
|
||||
- Convert to libalternatives
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 10:32:41 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-actdiag
|
||||
#
|
||||
# Copyright (c) 2024 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
|
||||
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without libalternatives
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-actdiag
|
||||
Version: 3.0.0
|
||||
@@ -26,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}
|
||||
@@ -33,11 +36,11 @@ BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: alts
|
||||
Requires: python-blockdiag >= 3
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -46,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
|
||||
@@ -58,13 +59,52 @@ 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)"
|
||||
|
||||
%post
|
||||
%python_install_alternative actdiag
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative actdiag
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative actdiag
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
29
support-new-fancy-blockdiag-pytest.patch
Normal file
29
support-new-fancy-blockdiag-pytest.patch
Normal file
@@ -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)
|
Reference in New Issue
Block a user