Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add err msg for attempted tests without any files #394

Merged
merged 1 commit into from
Jan 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nbdev/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
2 changes: 2 additions & 0 deletions nbs/04_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
]
Expand Down