Skip to content

Commit 3581d24

Browse files
committed
Correct parameter name for hook
1 parent 76e052a commit 3581d24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nbval/plugin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ def pytest_configure(config):
134134

135135

136136

137-
def pytest_collect_file(collection_path, parent):
137+
def pytest_collect_file(file_path, parent):
138138
"""
139139
Collect IPython notebooks using the specified pytest hook
140140
"""
141141
opt = parent.config.option
142-
if (opt.nbval or opt.nbval_lax) and collection_path.suffix == ".ipynb":
142+
if (opt.nbval or opt.nbval_lax) and file_path.suffix == ".ipynb":
143143
# https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent
144-
return IPyNbFile.from_parent(parent, path=collection_path)
144+
return IPyNbFile.from_parent(parent, path=file_path)
145145

146146

147147
comment_markers = {

0 commit comments

Comments
 (0)