def list_datasets(ctx): # test omegaml functionality br = ctx.browser nb = Notebook(br) code = """ import omegaml as om om.datasets.put(['sample'], 'sample', append=False) om.datasets.list('sample') """.strip() nb.new_cell_exec(code) sleep(10) current = nb.current_cell_output() expected = "['sample']" assert current == expected, "Expected {expected}, got {current}".format(**locals)
def create_notebook(ctx): br = ctx.browser nb = Notebook(br) nb.create_notebook() nb.save_notebook() assert not br.is_text_present('error while saving') # test code execution code = """ print('hello') """.strip() nb.current_cell_exec(code) sleep(1) assert nb.current_cell_output() == 'hello' nb.save_notebook() assert not br.is_text_present('error while saving')