Skip to content

Commit 799a510

Browse files
author
Martin Journois
committed
👻 pep8
1 parent 0c3f08c commit 799a510

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/test_notebooks.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,19 @@
1616
class NotebookTester(object):
1717
def __init__(self, filename):
1818
self.filename = filename
19+
1920
def __call__(self, exporter=None, filename=None):
2021
raw_nb = nbconvert.exporters.Exporter().from_filename(self.filename)
21-
raw_nb[0].metadata.setdefault('kernelspec',{})['name'] = 'python'
22+
raw_nb[0].metadata.setdefault('kernelspec', {})['name'] = 'python'
2223
exec_nb = nbconvert.preprocessors.ExecutePreprocessor().preprocess(*raw_nb)
2324

2425
if exporter is not None:
2526
out_nb = nbconvert.exporters.MarkdownExporter().from_notebook_node(*exec_nb)
2627
if filename is None:
2728
assert self.filename.endswith('.ipynb')
2829
filename = self.filename[:-6] + exporter.file_extension
29-
open(filename,'w').write(out_nb[0].encode('utf-8'))
30+
open(filename, 'w').write(out_nb[0].encode('utf-8'))
31+
3032

3133
class TestNotebooks(object):
3234
_filepath = rootpath.rstrip('/')+'/../examples/'

0 commit comments

Comments
 (0)