Skip to content

Commit 019772c

Browse files
committed
Make lint happy
1 parent fd30aaf commit 019772c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tests/test_preprocessors.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def test_preprocessor_svg2pdf():
9595
def test_preprocessor_embedimages():
9696
"""Test python embedimages preprocessor."""
9797
# check import shortcut
98-
from jupyter_contrib_nbextensions.nbconvert_support import EmbedImagesPreprocessor # noqa E501
98+
from jupyter_contrib_nbextensions.nbconvert_support import EmbedImagesPreprocessor # noqa E501
9999
notebook_node = nbf.new_notebook(cells=[
100100
nbf.new_code_cell(source="a = 'world'"),
101101
nbf.new_markdown_cell(
@@ -110,13 +110,14 @@ def test_preprocessor_embedimages():
110110
expected = 'image/png'
111111
assert_in(expected, body, 'Attachment {} is missing'.format(expected))
112112

113+
113114
def test_preprocessor_embedimages_resize():
114115
"""Test python embedimages preprocessor."""
115116
# check import shortcut
116-
from jupyter_contrib_nbextensions.nbconvert_support import EmbedImagesPreprocessor # noqa E501
117+
from jupyter_contrib_nbextensions.nbconvert_support import EmbedImagesPreprocessor # noqa E501
117118

118119
try:
119-
from PIL import Image
120+
from PIL import Image # noqa F401
120121
except ImportError:
121122
raise SkipTest('PIL not found')
122123

@@ -130,25 +131,27 @@ def test_preprocessor_embedimages_resize():
130131
notebook_node, EmbedImagesPreprocessor, NotebookExporter, 'ipynb')
131132
len_noembed = len(body)
132133

133-
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True, 'resize': 'small'})
134+
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True,
135+
'resize': 'small'})
134136
body, resources = export_through_preprocessor(
135137
notebook_node, EmbedImagesPreprocessor, NotebookExporter, 'ipynb',
136138
customconfig)
137139
len_small = len(body)
138140

139-
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True, 'resize': 'mid'})
141+
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True,
142+
'resize': 'mid'})
140143
body, resources = export_through_preprocessor(
141144
notebook_node, EmbedImagesPreprocessor, NotebookExporter, 'ipynb',
142145
customconfig)
143146
len_mid = len(body)
144147

145-
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True, 'resize': 'large'})
148+
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True,
149+
'resize': 'large'})
146150
body, resources = export_through_preprocessor(
147151
notebook_node, EmbedImagesPreprocessor, NotebookExporter, 'ipynb',
148152
customconfig)
149153
len_large = len(body)
150154

151-
152155
customconfig = Config(EmbedImagesPreprocessor={'embed_images': True})
153156
body, resources = export_through_preprocessor(
154157
notebook_node, EmbedImagesPreprocessor, NotebookExporter, 'ipynb',

0 commit comments

Comments
 (0)