Skip to content

Commit 3108aa7

Browse files
committed
Test notebook for cells with a semicolon
This notebook contains a cell where the output is suppressed with a semicolon. Nbval fails for this cell. The notebook was created with the most recent version of jupyter notebook. It was run from the top, saved and closed. How to reproduce: ``` pytest --nbval tests/semicolon.ipynb ``` What should happen: The test passes.
1 parent d7bc348 commit 3108aa7

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

tests/semicolon.ipynb

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": 1,
6+
"id": "afdb005e",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"def test():\n",
11+
" return \"hello test\""
12+
]
13+
},
14+
{
15+
"cell_type": "code",
16+
"execution_count": 2,
17+
"id": "0220821a",
18+
"metadata": {},
19+
"outputs": [
20+
{
21+
"data": {
22+
"text/plain": [
23+
"'hello test'"
24+
]
25+
},
26+
"execution_count": 2,
27+
"metadata": {},
28+
"output_type": "execute_result"
29+
}
30+
],
31+
"source": [
32+
"test()"
33+
]
34+
},
35+
{
36+
"cell_type": "code",
37+
"execution_count": 3,
38+
"id": "34a62f9b",
39+
"metadata": {},
40+
"outputs": [],
41+
"source": [
42+
"test();"
43+
]
44+
},
45+
{
46+
"cell_type": "code",
47+
"execution_count": null,
48+
"id": "fe1825a1",
49+
"metadata": {},
50+
"outputs": [],
51+
"source": []
52+
}
53+
],
54+
"metadata": {
55+
"kernelspec": {
56+
"display_name": "Python 3 (ipykernel)",
57+
"language": "python",
58+
"name": "python3"
59+
},
60+
"language_info": {
61+
"codemirror_mode": {
62+
"name": "ipython",
63+
"version": 3
64+
},
65+
"file_extension": ".py",
66+
"mimetype": "text/x-python",
67+
"name": "python",
68+
"nbconvert_exporter": "python",
69+
"pygments_lexer": "ipython3",
70+
"version": "3.10.8"
71+
}
72+
},
73+
"nbformat": 4,
74+
"nbformat_minor": 5
75+
}

0 commit comments

Comments
 (0)