Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-blockdiag for openSUSE:Factory checked in at 2021-09-03 21:25:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-blockdiag (Old) and /work/SRC/openSUSE:Factory/.python-blockdiag.new.1899 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-blockdiag" Fri Sep 3 21:25:26 2021 rev:7 rq:915434 version:2.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-blockdiag/python-blockdiag.changes 2020-02-24 15:56:32.216013674 +0100 +++ /work/SRC/openSUSE:Factory/.python-blockdiag.new.1899/python-blockdiag.changes 2021-09-03 21:25:28.150122854 +0200 @@ -1,0 +2,12 @@ +Wed Sep 1 07:28:26 UTC 2021 - pgaj...@suse.com + +- added patches + https://github.com/blockdiag/blockdiag/pull/131 + + python-blockdiag-nose-to-pytest.patch + +------------------------------------------------------------------- +Mon Aug 30 13:34:57 UTC 2021 - pgaj...@suse.com + +- %check: test the package + +------------------------------------------------------------------- New: ---- python-blockdiag-nose-to-pytest.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-blockdiag.spec ++++++ --- /var/tmp/diff_new_pack.44l0KU/_old 2021-09-03 21:25:28.758124214 +0200 +++ /var/tmp/diff_new_pack.44l0KU/_new 2021-09-03 21:25:28.762124223 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-blockdiag # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,8 +17,6 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} -# tests need network connection -%bcond_with tests %define skip_python2 1 Name: python-blockdiag Version: 2.0.1 @@ -28,6 +26,8 @@ Group: Development/Languages/Python URL: http://blockdiag.com/ Source: https://files.pythonhosted.org/packages/source/b/blockdiag/blockdiag-%{version}.tar.gz +# https://github.com/blockdiag/blockdiag/pull/131 +Patch0: python-blockdiag-nose-to-pytest.patch BuildRequires: %{python_module Pillow >= 2.2.1} BuildRequires: %{python_module funcparserlib >= 0.3.6} BuildRequires: %{python_module reportlab} @@ -39,15 +39,14 @@ Requires: python-funcparserlib >= 0.3.6 Requires: python-webcolors Requires(post): update-alternatives -Requires(preun): update-alternatives +Requires(preun):update-alternatives BuildArch: noarch -%if %{with tests} +# SECTION test requirements BuildRequires: %{python_module docutils} -BuildRequires: %{python_module mock} -BuildRequires: %{python_module nose} BuildRequires: %{python_module pep8 >= 1.3} BuildRequires: %{python_module pip >= 1.4.1} -%endif +BuildRequires: %{python_module pytest} +# /SECTION %if 0%{?suse_version} >= 1000 || 0%{?fedora_version} >= 24 Recommends: ghostscript Recommends: python-Wand @@ -61,6 +60,7 @@ %prep %setup -q -n blockdiag-%{version} +%patch0 -p1 %build %python_build @@ -76,10 +76,14 @@ %preun %python_uninstall_alternative blockdiag -%if %{with tests} %check -%python_exec setup.py test -%endif +pushd src +# other disabled tests: +# [ 9s] WARNING: Could not retrieve: http://blockdiag.com/favicon.ico +# [ 9s] WARNING: Could not retrieve: http://upload.wikimedia.org/wikipedia/commons/9/9b/Scalable_Vector_Graphics_Circle2.svg +# [ 9s] WARNING: Could not retrieve: http://people.sc.fsu.edu/~jburkardt/data/eps/circle.eps +%pytest -k 'not (test_app_cleans_up_images or test_node_attribute or test_setup_inline_svg_is_true_with_multibytes)' +popd %files %{python_files} %license LICENSE ++++++ python-blockdiag-nose-to-pytest.patch ++++++ diff --git a/setup.py b/setup.py index 116434d..7da66c2 100644 --- a/setup.py +++ b/setup.py @@ -67,7 +67,7 @@ def get_version(): 'docutils' ], 'testing': [ - 'nose', + 'pytest', 'flake8', 'flake8-coding', 'flake8-copyright', @@ -76,7 +76,6 @@ def get_version(): 'docutils', ], }, - test_suite='nose.collector', entry_points=""" [console_scripts] blockdiag = blockdiag.command:main diff --git a/src/blockdiag/tests/rst/test_blockdiag_directives.py b/src/blockdiag/tests/rst/test_blockdiag_directives.py index 0b86583..72ed086 100644 --- a/src/blockdiag/tests/rst/test_blockdiag_directives.py +++ b/src/blockdiag/tests/rst/test_blockdiag_directives.py @@ -24,6 +24,9 @@ from blockdiag.tests.utils import TemporaryDirectory, capture_stderr, with_pil from blockdiag.utils.rst import directives +TESTDIR = os.path.dirname(__file__) +FONTPATH = os.path.join(TESTDIR, '..', 'VLGothic', 'VL-Gothic-Regular.ttf') + class TestRstDirectives(unittest.TestCase): def setUp(self): @@ -178,7 +181,7 @@ def test_setup_inline_svg_is_true_but_format_isnt_svg(self): self.assertEqual(nodes.image, type(doctree[0])) def test_setup_inline_svg_is_true_with_multibytes(self): - directives.setup(format='SVG', outputdir=self.tmpdir) + directives.setup(format='SVG', outputdir=self.tmpdir, fontpath=FONTPATH) text = (".. blockdiag::\n" "\n" " ??? -> ???") diff --git a/src/blockdiag/tests/test_generate_diagram.py b/src/blockdiag/tests/test_generate_diagram.py index 361c86f..6b9a773 100644 --- a/src/blockdiag/tests/test_generate_diagram.py +++ b/src/blockdiag/tests/test_generate_diagram.py @@ -18,8 +18,6 @@ import sys import unittest -from nose.tools import nottest - import blockdiag import blockdiag.command from blockdiag.tests.utils import (TemporaryDirectory, capture_stderr, @@ -51,7 +49,7 @@ def test_generate(): files = get_diagram_files(basepath) options = [] - for testcase in testcase_generator(basepath, mainfunc, files, options): + for testcase in _testcase_generator(basepath, mainfunc, files, options): yield testcase @@ -62,12 +60,11 @@ def test_generate_with_separate(): filtered = (f for f in files if re.search('separate', f)) options = ['--separate'] - for testcase in testcase_generator(basepath, mainfunc, filtered, options): + for testcase in _testcase_generator(basepath, mainfunc, filtered, options): yield testcase -@nottest -def testcase_generator(basepath, mainfunc, files, options): +def _testcase_generator(basepath, mainfunc, files, options): fontpath = get_fontpath(basepath) options = options + ['-f', fontpath] diff --git a/tox.ini b/tox.ini index 3912471..48b0c85 100644 --- a/tox.ini +++ b/tox.ini @@ -18,5 +18,5 @@ deps = passenv = ALL_TESTS commands = - nosetests + pytest flake8 src