Skip to content

Commit

Permalink
added test/test_remove_output.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kangwonlee committed Dec 26, 2017
1 parent 7d2a0f7 commit 4d3c2ca
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test_remove_output.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import unittest

import nb_file_util as fu
import ipynb_remove_output as rm


class TestRemoveOutput(unittest.TestCase):
def setUp(self):
self.input_file_name = 'sample_with_output.ipynb'

def test_delete_output_file(self):
rm_cp = rm.CellProcessorDeleteOutput()
p = fu.FileProcessor(self.input_file_name, rm_cp)

p.process_nb_file(b_write_file=True)

node_dict = p.read_file()

cells = node_dict.get('cells', [])

for k, cell in enumerate(cells):
self.assertFalse(cell.get('outputs'))

0 comments on commit 4d3c2ca

Please sign in to comment.