File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed
notebooks/beginner/exercises Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 66 "metadata" : {},
77 "outputs" : [],
88 "source" : [
9- " # Required boilerplate\n " ,
9+ " # Let's make sure pytest and ipytest packages are installed\n " ,
10+ " # ipytest is required for running pytest inside Jupyter notebooks\n " ,
1011 " import sys\n " ,
1112 " \n " ,
1213 " !{sys.executable} -m pip install pytest\n " ,
1314 " !{sys.executable} -m pip install ipytest\n " ,
1415 " \n " ,
15- " import ipytest.magics \n " ,
16- " import pytest \n " ,
16+ " # These are needed for running pytest inside Jupyter notebooks \n " ,
17+ " import ipytest \n " ,
1718 " \n " ,
18- " __file__ = \" testing1_exercise.ipynb \" "
19+ " ipytest.autoconfig() "
1920 ]
2021 },
2122 {
5051 "metadata" : {},
5152 "outputs" : [],
5253 "source" : [
53- " %%run_pytest[clean] \n " ,
54+ " %%ipytest \n " ,
5455 " \n " ,
5556 " def test_get_divisible_by_five():\n " ,
5657 " # Your implementation here\n "
5960 ],
6061 "metadata" : {
6162 "kernelspec" : {
62- "display_name" : " Python 3" ,
63+ "display_name" : " Python 3 (ipykernel) " ,
6364 "language" : " python" ,
6465 "name" : " python3"
6566 },
7374 "name" : " python" ,
7475 "nbconvert_exporter" : " python" ,
7576 "pygments_lexer" : " ipython3" ,
76- "version" : " 3.5.4 "
77+ "version" : " 3.11.0 "
7778 }
7879 },
7980 "nbformat" : 4 ,
Original file line number Diff line number Diff line change 66 "metadata" : {},
77 "outputs" : [],
88 "source" : [
9- " # Required boilerplate\n " ,
9+ " # Let's make sure pytest and ipytest packages are installed\n " ,
10+ " # ipytest is required for running pytest inside Jupyter notebooks\n " ,
1011 " import sys\n " ,
1112 " \n " ,
1213 " !{sys.executable} -m pip install pytest\n " ,
1314 " !{sys.executable} -m pip install ipytest\n " ,
1415 " \n " ,
15- " import ipytest.magics\n " ,
16+ " # These are needed for running pytest inside Jupyter notebooks\n " ,
17+ " import ipytest\n " ,
1618 " import pytest\n " ,
1719 " \n " ,
18- " __file__ = \" testing2_exercise.ipynb \" "
20+ " ipytest.autoconfig() "
1921 ]
2022 },
2123 {
8385 "metadata" : {},
8486 "outputs" : [],
8587 "source" : [
86- " %%run_pytest[clean] \n " ,
88+ " %%ipytest \n " ,
8789 " \n " ,
8890 " \n " ,
8991 " @pytest.____\n " ,
171173 "metadata" : {},
172174 "outputs" : [],
173175 "source" : [
174- " %%run_pytest[clean] \n " ,
176+ " %%ipytest \n " ,
175177 " \n " ,
176178 " # Your implementation here\n "
177179 ]
178180 }
179181 ],
180182 "metadata" : {
181183 "kernelspec" : {
182- "display_name" : " Python 3" ,
184+ "display_name" : " Python 3 (ipykernel) " ,
183185 "language" : " python" ,
184186 "name" : " python3"
185187 },
193195 "name" : " python" ,
194196 "nbconvert_exporter" : " python" ,
195197 "pygments_lexer" : " ipython3" ,
196- "version" : " 3.5.4 "
198+ "version" : " 3.11.0 "
197199 }
198200 },
199201 "nbformat" : 4 ,
You can’t perform that action at this time.
0 commit comments