Skip to content

Commit c8be7ac

Browse files
Test output is empty when only jupyter-input given
1 parent bd38393 commit c8be7ac

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/test_execute.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,11 @@ def test_input_cell(doctree):
663663
"""
664664
tree = doctree(source)
665665
(cell,) = tree.traverse(JupyterCellNode)
666-
(cellinput, _) = cell.children
666+
(cellinput, empty) = cell.children
667+
assert cell.attributes["hide_output"] is True
667668
assert cellinput.children[0].attributes["linenos"] is False
668669
assert cellinput.children[0].rawsource.strip() == "2 + 2"
670+
assert len(empty.children) == 0
669671

670672
def test_input_cell_linenos(doctree):
671673
source = """
@@ -676,9 +678,11 @@ def test_input_cell_linenos(doctree):
676678
"""
677679
tree = doctree(source)
678680
(cell,) = tree.traverse(JupyterCellNode)
679-
(cellinput, _) = cell.children
681+
(cellinput, empty) = cell.children
682+
assert cell.attributes["hide_output"] is True
680683
assert cellinput.children[0].attributes["linenos"] is True
681684
assert cellinput.children[0].rawsource.strip() == "2 + 2"
685+
assert len(empty.children) == 0
682686

683687
def test_output_cell(doctree):
684688
source = """

0 commit comments

Comments
 (0)