Skip to content

Commit bd6601a

Browse files
authored
nbdev-test takes its path as a positional argument
1 parent f1dbe50 commit bd6601a

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

nbdev/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def _keep_file(
123123
else: True
124124

125125
# %% ../nbs/api/12_test.ipynb #f8cc6a61-a48e-4ab1-89a9-18316ca795d6
126-
@call_parse
126+
@call_parse(pos=['path'])
127127
@delegates(nbglob_cli)
128128
def nbdev_test(
129129
path:str=None, # A notebook name or glob to test

nbs/api/12_test.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@
283283
"outputs": [],
284284
"source": [
285285
"#| export\n",
286-
"@call_parse\n",
286+
"@call_parse(pos=['path'])\n",
287287
"@delegates(nbglob_cli)\n",
288288
"def nbdev_test(\n",
289289
" path:str=None, # A notebook name or glob to test\n",
@@ -358,13 +358,13 @@
358358
"You can even run `nbdev-test` in non nbdev projects, for example, you can test an individual notebook like so:\n",
359359
"\n",
360360
"```\n",
361-
"nbdev-test --path ../../tests/minimal.ipynb --do-print\n",
361+
"nbdev-test ../../tests/minimal.ipynb --do-print\n",
362362
"```\n",
363363
"\n",
364364
"Or you can test an entire directory of notebooks filtered for only those that match a regular expression:\n",
365365
"\n",
366366
"```\n",
367-
"nbdev-test --path ../../tests --file-re '.*test.ipynb' --do-print\n",
367+
"nbdev-test ../../tests --file-re '.*test.ipynb' --do-print\n",
368368
"```"
369369
]
370370
},

nbs/tutorials/modular_nbdev.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@
123123
"You can test an individual notebook with the terminal command:\n",
124124
"\n",
125125
"```sh\n",
126-
"nbdev-test --path notebook.ipynb\n",
126+
"nbdev-test notebook.ipynb\n",
127127
"```\n",
128128
"\n",
129129
"...or a folder of notebooks:\n",
130130
"\n",
131131
"```sh\n",
132-
"nbdev-test --path tests/\n",
132+
"nbdev-test tests/\n",
133133
"```"
134134
]
135135
},

0 commit comments

Comments
 (0)