Skip to content

Commit f17a2db

Browse files
committed
more nose lines to change
1 parent 726cc92 commit f17a2db

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

lib/matplotlib/sphinxext/tests/test_tinypages.py

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
from subprocess import call, Popen, PIPE
99

10-
from nose import SkipTest
11-
from nose.tools import assert_true
10+
import pytest
1211

1312
HERE = dirname(__file__)
1413
TINY_PAGES = pjoin(HERE, 'tinypages')
@@ -19,7 +18,7 @@ def setup():
1918
try:
2019
ret = call(['sphinx-build', '--help'], stdout=PIPE, stderr=PIPE)
2120
except OSError:
22-
raise SkipTest('Need sphinx-build on path for these tests')
21+
raise pytest.skip('Need sphinx-build on path for these tests')
2322
if ret != 0:
2423
raise RuntimeError('sphinx-build does not return 0')
2524

@@ -62,29 +61,29 @@ def teardown_class(cls):
6261
shutil.rmtree(cls.page_build)
6362

6463
def test_some_plots(self):
65-
assert_true(isdir(self.html_dir))
64+
assert isdir(self.html_dir)
6665

6766
def plot_file(num):
6867
return pjoin(self.html_dir, 'some_plots-{0}.png'.format(num))
6968

7069
range_10, range_6, range_4 = [plot_file(i) for i in range(1, 4)]
7170
# Plot 5 is range(6) plot
72-
assert_true(file_same(range_6, plot_file(5)))
71+
assert file_same(range_6, plot_file(5))
7372
# Plot 7 is range(4) plot
74-
assert_true(file_same(range_4, plot_file(7)))
73+
assert file_same(range_4, plot_file(7))
7574
# Plot 11 is range(10) plot
76-
assert_true(file_same(range_10, plot_file(11)))
75+
assert file_same(range_10, plot_file(11))
7776
# Plot 12 uses the old range(10) figure and the new range(6) figure
78-
assert_true(file_same(range_10, plot_file('12_00')))
79-
assert_true(file_same(range_6, plot_file('12_01')))
77+
assert file_same(range_10, plot_file('12_00'))
78+
assert file_same(range_6, plot_file('12_01'))
8079
# Plot 13 shows close-figs in action
81-
assert_true(file_same(range_4, plot_file(13)))
80+
assert file_same(range_4, plot_file(13))
8281
# Plot 14 has included source
8382
with open(pjoin(self.html_dir, 'some_plots.html'), 'rt') as fobj:
8483
html_contents = fobj.read()
85-
assert_true('# Only a comment' in html_contents)
84+
assert '# Only a comment' in html_contents
8685
# check plot defined in external file.
87-
assert_true(file_same(range_4, pjoin(self.html_dir, 'range4.png')))
88-
assert_true(file_same(range_6, pjoin(self.html_dir, 'range6.png')))
86+
assert file_same(range_4, pjoin(self.html_dir, 'range4.png'))
87+
assert file_same(range_6, pjoin(self.html_dir, 'range6.png'))
8988
# check if figure caption made it into html file
90-
assert_true('This is the caption for plot 15.' in html_contents)
89+
assert 'This is the caption for plot 15.' in html_contents

lib/matplotlib/tests/test_dviread.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import matplotlib.dviread as dr
77
import os.path
88
import json
9+
import pytest
910

1011

1112
original_find_tex_file = dr.find_tex_file

0 commit comments

Comments
 (0)