We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 577e894 commit 32a5d0eCopy full SHA for 32a5d0e
src/nbmake/pytest_items.py
@@ -11,7 +11,7 @@
11
from pygments.lexers import Python3TracebackLexer
12
13
from .nb_result import NotebookError, NotebookResult
14
-from .nb_run import NotebookRun
+from .nb_run import NB_VERSION, NotebookRun
15
16
17
class NbMakeFailureRepr(TerminalRepr):
@@ -27,7 +27,8 @@ class NotebookFile(pytest.File):
27
def collect(self) -> Generator[Any, Any, Any]:
28
item = NotebookItem.from_parent(self, filename=str(Path(self.fspath)))
29
30
- nb = nbformat.read(self.fspath, 4)
+ with open(self.fspath, "rb") as fp:
31
+ nb = nbformat.read(fp, NB_VERSION)
32
33
try:
34
markers = nb.metadata.execution.markers
0 commit comments