Beispiel #1
0
def test_error_update_not_ipynb(nb_file=list_notebooks()[0]):
    with pytest.raises(ValueError):
        cli_jupytext([nb_file, '--to', 'py', '--update'])
Beispiel #2
0
def test_error_no_ext(nb_file=list_notebooks()[0]):
    with pytest.raises(TypeError):
        cli_jupytext([nb_file])
Beispiel #3
0
def test_error_not_notebook_ext_output(nb_file=list_notebooks()[0]):
    with pytest.raises(TypeError):
        cli_jupytext([nb_file, '-o', 'not.ext'])
Beispiel #4
0
def test_cli_multiple_files(nb_files):
    assert cli_jupytext(nb_files + ['--to', 'py']).notebooks == nb_files
Beispiel #5
0
def test_cli_single_file(nb_file):
    assert cli_jupytext([nb_file] + ['--to', 'py']).notebooks == [nb_file]
Beispiel #6
0
def test_cli_no_argument():
    with pytest.raises(ValueError):
        cli_jupytext([])