forked from pool/python-blockdiag
94 lines
3.0 KiB
Diff
94 lines
3.0 KiB
Diff
|
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
|
||
|
|