From a2f59947878c9524c043cb47137524ec3e21855d Mon Sep 17 00:00:00 2001 From: hamelsmu Date: Wed, 20 Jan 2021 14:57:02 -0800 Subject: [PATCH] add err msg --- nbdev/test.py | 1 + nbs/04_test.ipynb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/nbdev/test.py b/nbdev/test.py index 335efc7cf..5f01a37d3 100644 --- a/nbdev/test.py +++ b/nbdev/test.py @@ -108,6 +108,7 @@ def nbdev_test_nbs(fname:Param("A notebook name or glob to convert", str)=None, if flags is not None: flags = flags.split(' ') files = nbglob(fname) files = [Path(f).absolute() for f in sorted(files)] + assert len(files) > 0, "No files to test found." if n_workers is None: n_workers = 0 if len(files)==1 else min(num_cpus(), 8) # make sure we are inside the notebook folder of the project os.chdir(Config().path("nbs_path")) diff --git a/nbs/04_test.ipynb b/nbs/04_test.ipynb index 4f6436d7a..54bdbe43e 100644 --- a/nbs/04_test.ipynb +++ b/nbs/04_test.ipynb @@ -317,6 +317,7 @@ " if flags is not None: flags = flags.split(' ')\n", " files = nbglob(fname)\n", " files = [Path(f).absolute() for f in sorted(files)]\n", + " assert len(files) > 0, \"No files to test found.\"\n", " if n_workers is None: n_workers = 0 if len(files)==1 else min(num_cpus(), 8)\n", " # make sure we are inside the notebook folder of the project\n", " os.chdir(Config().path(\"nbs_path\"))\n", @@ -374,6 +375,7 @@ "Converted 06_cli.ipynb.\n", "Converted 07_clean.ipynb.\n", "Converted 99_search.ipynb.\n", + "Converted example.ipynb.\n", "Converted index.ipynb.\n", "Converted tutorial.ipynb.\n" ]