Skip to content

Commit

Permalink
implement notebook testing pipeline using unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Aug 28, 2023
1 parent 61a6aa9 commit 3bc18cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/notebook_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@ def _test_cell(self, test_out, cell_out, execution_count, value_test=True):
for result, gt in zip(test_out, cell_out):
res = result.as_dict()

# smoke test
# smoke tests
self.assertEqual(execution_count, res["execution_count"])

self.assertEqual(res['output_type'], gt['output_type'])

if hasattr(gt, "name") and getattr(gt, "name") == "stderr":
continue

# value test
if value_test:
if hasattr(gt, "data"):
process_display_data(None, gt)
Expand Down

0 comments on commit 3bc18cb

Please sign in to comment.