File tree 4 files changed +91
-0
lines changed
4 files changed +91
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,23 @@ To install the development version:
72
72
73
73
See the documentation at: http://pytest-notebook.readthedocs.io/
74
74
75
+ If you want to test some sample notebooks, add the ` --nb-test-files ` flag:
76
+
77
+ ``` shell
78
+ >> git clone https://github.com/chrisjsewell/pytest-notebook
79
+ >> cd pytest-notebook/samples
80
+ >> pip install pytest ipykernel pytest-notebook
81
+ >> pytest --nb-test-files * .ipynb
82
+ ```
83
+
84
+ You should see ` success.ipynb ` passed the test and ` fail.ipynb ` failed the test.
85
+
86
+ You can regenerate the outputs of ` fail.ipynb ` with the ` --nb-force-regen ` flag:
87
+
88
+ ``` shell
89
+ >> pytest --nb-test-files --nb-force-regen * .ipynb
90
+ ```
91
+
75
92
## Contributing
76
93
77
94
Contributions are very welcome.
Original file line number Diff line number Diff line change
1
+ {
2
+ "cells" : [
3
+ {
4
+ "cell_type" : " code" ,
5
+ "execution_count" : 1 ,
6
+ "metadata" : {},
7
+ "outputs" : [
8
+ {
9
+ "name" : " stdout" ,
10
+ "output_type" : " stream" ,
11
+ "text" : [
12
+ " B\n "
13
+ ]
14
+ }
15
+ ],
16
+ "source" : [
17
+ " print(\" A\" )"
18
+ ]
19
+ }
20
+ ],
21
+ "metadata" : {
22
+ "language_info" : {
23
+ "codemirror_mode" : {
24
+ "name" : " ipython" ,
25
+ "version" : 3
26
+ },
27
+ "file_extension" : " .py" ,
28
+ "mimetype" : " text/x-python" ,
29
+ "name" : " python" ,
30
+ "nbconvert_exporter" : " python" ,
31
+ "pygments_lexer" : " ipython3" ,
32
+ "version" : " 3.8.12"
33
+ }
34
+ },
35
+ "nbformat" : 4 ,
36
+ "nbformat_minor" : 2
37
+ }
Original file line number Diff line number Diff line change
1
+ {
2
+ "cells" : [
3
+ {
4
+ "cell_type" : " code" ,
5
+ "execution_count" : 1 ,
6
+ "metadata" : {},
7
+ "outputs" : [
8
+ {
9
+ "name" : " stdout" ,
10
+ "output_type" : " stream" ,
11
+ "text" : [
12
+ " A\n "
13
+ ]
14
+ }
15
+ ],
16
+ "source" : [
17
+ " print(\" A\" )"
18
+ ]
19
+ }
20
+ ],
21
+ "metadata" : {
22
+ "language_info" : {
23
+ "codemirror_mode" : {
24
+ "name" : " ipython" ,
25
+ "version" : 3
26
+ },
27
+ "file_extension" : " .py" ,
28
+ "mimetype" : " text/x-python" ,
29
+ "name" : " python" ,
30
+ "nbconvert_exporter" : " python" ,
31
+ "pygments_lexer" : " ipython3" ,
32
+ "version" : " 3.8.12"
33
+ }
34
+ },
35
+ "nbformat" : 4 ,
36
+ "nbformat_minor" : 2
37
+ }
You can’t perform that action at this time.
0 commit comments