Skip to content

Commit 39595cc

Browse files
committed
clean code
1 parent 1ba9637 commit 39595cc

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

lessons/python/docs_and_testing.ipynb

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -218,23 +218,16 @@
218218
"Pytest supports parameterization, which allows a single unit test function to run multiple scenarios with different input values. The pytest.mark.parametrize is a decorator provided by pytest, which allows you to run the same test function multiple times with different sets of arguments. Below is an example using parameterization to test the case for invalid degree_day_factor. The pytest.raises context manager is used when we expect an exception to be raised during function execution—such as a ValueError for invalid inputs."
219219
]
220220
},
221-
{
222-
"cell_type": "code",
223-
"execution_count": null,
224-
"id": "c1989288-17f6-4a0a-843e-77f4a7fd018e",
225-
"metadata": {},
226-
"outputs": [],
227-
"source": [
228-
"import pytest"
229-
]
230-
},
231221
{
232222
"cell_type": "code",
233223
"execution_count": null,
234224
"id": "16",
235225
"metadata": {},
236226
"outputs": [],
237227
"source": [
228+
"import pytest\n",
229+
"\n",
230+
"\n",
238231
"# test invalid degree_day_factor input\n",
239232
"@pytest.mark.parametrize(\"degree_day_factor\", [0, -1])\n",
240233
"def test_invalid_degree_day_factor(degree_day_factor):\n",

0 commit comments

Comments
 (0)