Esempio n. 1
0
def test_error_update_not_ipynb(nb_file=list_notebooks()[0]):
    with pytest.raises(ValueError):
        cli_jupytext([nb_file, '--to', 'py', '--update'])
Esempio n. 2
0
def test_error_no_ext(nb_file=list_notebooks()[0]):
    with pytest.raises(TypeError):
        cli_jupytext([nb_file])
Esempio n. 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'])
Esempio n. 4
0
def test_cli_multiple_files(nb_files):
    assert cli_jupytext(nb_files + ['--to', 'py']).notebooks == nb_files
Esempio n. 5
0
def test_cli_single_file(nb_file):
    assert cli_jupytext([nb_file] + ['--to', 'py']).notebooks == [nb_file]
Esempio n. 6
0
def test_cli_no_argument():
    with pytest.raises(ValueError):
        cli_jupytext([])