Skip to content

Commit d8d7c01

Browse files
committed
Remove some more compatibility code for old pytest (versions < 6)
1 parent 3581d24 commit d8d7c01

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

nbval/plugin.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,9 @@ def collect(self):
344344
options.update(comment_opts)
345345
options.setdefault('check', self.compare_outputs)
346346
name = 'Cell ' + str(cell_num)
347-
# https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent
348-
if hasattr(IPyNbCell, "from_parent"):
349-
yield IPyNbCell.from_parent(
350-
self, name=name, cell_num=cell_num, cell=cell, options=options
351-
)
352-
else:
353-
yield IPyNbCell(name, self, cell_num, cell, options)
347+
yield IPyNbCell.from_parent(
348+
self, name=name, cell_num=cell_num, cell=cell, options=options
349+
)
354350

355351
# Update 'code' cell count
356352
cell_num += 1

0 commit comments

Comments
 (0)