@@ -69,8 +69,7 @@ def test_process_notebook_with_worksheets(write_notebook: WriteNotebookFunc) ->
6969 nb_with = write_notebook ("with_worksheets.ipynb" , with_worksheets )
7070 nb_without = write_notebook ("without_worksheets.ipynb" , without_worksheets )
7171
72- with pytest .warns (DeprecationWarning , match = "Worksheets are deprecated as of IPEP-17." ):
73- result_with = process_notebook (nb_with )
72+ result_with = process_notebook (nb_with )
7473
7574 # Should not raise a warning
7675 result_without = process_notebook (nb_without )
@@ -104,22 +103,9 @@ def test_process_notebook_multiple_worksheets(write_notebook: WriteNotebookFunc)
104103 nb_multi = write_notebook ("multiple_worksheets.ipynb" , multi_worksheets )
105104 nb_single = write_notebook ("single_worksheet.ipynb" , single_worksheet )
106105
107- # Expect DeprecationWarning + UserWarning
108- with pytest .warns (
109- DeprecationWarning ,
110- match = "Worksheets are deprecated as of IPEP-17. Consider updating the notebook." ,
111- ), pytest .warns (
112- UserWarning ,
113- match = "Multiple worksheets detected. Combining all worksheets into a single script." ,
114- ):
115- result_multi = process_notebook (nb_multi )
116-
117- # Expect DeprecationWarning only
118- with pytest .warns (
119- DeprecationWarning ,
120- match = "Worksheets are deprecated as of IPEP-17. Consider updating the notebook." ,
121- ):
122- result_single = process_notebook (nb_single )
106+ result_multi = process_notebook (nb_multi )
107+
108+ result_single = process_notebook (nb_single )
123109
124110 assert result_multi != result_single , "Two worksheets should produce more content than one."
125111 assert len (result_multi ) > len (result_single ), "The multi-worksheet notebook should have extra code content."
0 commit comments