forked from pool/python-blockdiag
- Update to 3.0.0 * Drop python3.6 support * Use funcparserlib-1.0.0a0 or newer to support new python versions * Allow to write multiline string via triple quotes (""" ... """) * Fix #147: file existence disclosure using svg renderer - Refresh python-blockdiag-nose-to-pytest.patch OBS-URL: https://build.opensuse.org/request/show/993133 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blockdiag?expand=0&rev=20
72 lines
2.1 KiB
Diff
72 lines
2.1 KiB
Diff
Index: blockdiag-3.0.0/setup.py
|
|
===================================================================
|
|
--- blockdiag-3.0.0.orig/setup.py
|
|
+++ blockdiag-3.0.0/setup.py
|
|
@@ -65,7 +65,7 @@ setup(
|
|
'docutils'
|
|
],
|
|
'testing': [
|
|
- 'nose',
|
|
+ 'pytest',
|
|
'flake8',
|
|
'flake8-coding',
|
|
'flake8-copyright',
|
|
@@ -74,7 +74,6 @@ setup(
|
|
'docutils',
|
|
],
|
|
},
|
|
- test_suite='nose.collector',
|
|
entry_points="""
|
|
[console_scripts]
|
|
blockdiag = blockdiag.command:main
|
|
Index: blockdiag-3.0.0/src/blockdiag/tests/test_generate_diagram.py
|
|
===================================================================
|
|
--- blockdiag-3.0.0.orig/src/blockdiag/tests/test_generate_diagram.py
|
|
+++ blockdiag-3.0.0/src/blockdiag/tests/test_generate_diagram.py
|
|
@@ -19,8 +19,6 @@ import sys
|
|
import unittest
|
|
from xml.etree import ElementTree
|
|
|
|
-from nose.tools import nottest
|
|
-
|
|
import blockdiag
|
|
import blockdiag.command
|
|
from blockdiag.tests.utils import (TemporaryDirectory, capture_stderr,
|
|
@@ -52,7 +50,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
|
|
|
|
|
|
@@ -63,12 +61,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]
|
|
|
|
Index: blockdiag-3.0.0/tox.ini
|
|
===================================================================
|
|
--- blockdiag-3.0.0.orig/tox.ini
|
|
+++ blockdiag-3.0.0/tox.ini
|
|
@@ -18,7 +18,7 @@ deps =
|
|
passenv =
|
|
ALL_TESTS
|
|
commands =
|
|
- nosetests
|
|
+ pytest
|
|
|
|
[testenv:flake8]
|
|
description =
|