@@ -80,7 +80,7 @@ def test_process_multiple_notebooks(tmp_pathplus):
8080
8181def test_convert_notebook (tmp_pathplus ):
8282 notebook = tests_dir / "example_notebook.ipynb"
83- outfile = tmp_pathplus / "output/ example_notebook.py"
83+ outfile = tmp_pathplus / "output" / " example_notebook.py"
8484 convert_notebook (notebook , outfile )
8585 check_output (outfile )
8686
@@ -96,8 +96,30 @@ def test_cli(tmp_pathplus):
9696 args = [str (tests_dir / "example_notebook.ipynb" ), "--outdir" , str (outdir )],
9797 )
9898 assert result .exit_code == 0
99- assert result .stdout == dedent (f"""\
99+ assert result .stdout == dedent (
100+ f"""\
100101 Converting { tests_dir } /example_notebook.ipynb to { tmp_pathplus } /output/example_notebook.py
101- """ )
102+ """
103+ )
104+
105+ check_output (outdir / "example_notebook.py" )
106+
107+
108+ def test_cli_glob (tmp_pathplus ):
109+ outdir = tmp_pathplus / "output/"
110+
111+ with in_directory (tmp_pathplus ):
112+ runner = CliRunner ()
113+ result : Result = runner .invoke (
114+ main ,
115+ catch_exceptions = False ,
116+ args = [str (tests_dir / "*.ipynb" ), "--outdir" , str (outdir )],
117+ )
118+ assert result .exit_code == 0
119+ assert result .stdout == dedent (
120+ f"""\
121+ Converting { tests_dir } /example_notebook.ipynb to { tmp_pathplus } /output/example_notebook.py
122+ """
123+ )
102124
103125 check_output (outdir / "example_notebook.py" )
0 commit comments