File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ Usage is very simple:
20
20
pip install pytest-ipynb2
21
21
```
22
22
23
- 1. Enable by adding to the default options in ` pyproject.toml` ` ` :
23
+ 1. Enable by adding to the default options in ` pyproject.toml` :
24
24
25
25
` ` ` toml
26
26
[tool.pytest.ini_options]
Original file line number Diff line number Diff line change 53
53
fix :
54
54
- uv run ruff check . --fix
55
55
- uv run ruff format .
56
+ - uv run ruff check . --fix # run again to fix any trailing commas
56
57
57
58
# format with ruff
58
59
format :
Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ class Notebook:
61
61
"""
62
62
63
63
def __init__ (self , filepath : Path ) -> None :
64
+ self .codecells : SourceList
65
+ """The code cells *excluding* any identified as test cells"""
66
+ self .testcells : SourceList
67
+ """The code cells which are identified as containing tests, based upon the presence of the `%%ipytest`magic."""
68
+
64
69
contents = nbformat .read (fp = str (filepath ), as_version = 4 )
65
70
nbformat .validate (contents )
66
71
cells = contents .cells
You can’t perform that action at this time.
0 commit comments