@@ -134,9 +134,7 @@ def test_dpip_magic_loads(ipython_shell):
134134
135135
136136@mock .patch .object (DataprocSparkSession , "addArtifacts" )
137- def test_dpip_install_single_package (
138- mock_add_artifacts , ipython_shell , capsys
139- ):
137+ def test_dpip_install_single_package (mock_add_artifacts , ipython_shell , capsys ):
140138 """Test installing a single package with %dpip."""
141139 ipython_shell .run_line_magic ("dpip" , "install pandas" )
142140 mock_add_artifacts .assert_called_once_with ("pandas" , pypi = True )
@@ -150,9 +148,7 @@ def test_dpip_install_multiple_packages_with_flags(
150148 mock_add_artifacts , ipython_shell , capsys
151149):
152150 """Test installing multiple packages with flags like -U."""
153- ipython_shell .run_line_magic (
154- "dpip" , "install -U numpy scikit-learn"
155- )
151+ ipython_shell .run_line_magic ("dpip" , "install -U numpy scikit-learn" )
156152 calls = [
157153 mock .call ("numpy" , pypi = True ),
158154 mock .call ("scikit-learn" , pypi = True ),
@@ -168,9 +164,7 @@ def test_dpip_no_install_command(ipython_shell, capsys):
168164 """Test usage message when 'install' is missing."""
169165 ipython_shell .run_line_magic ("dpip" , "pandas" )
170166 captured = capsys .readouterr ()
171- assert (
172- "Usage: %dpip install <package1> <package2> ..." in captured .out
173- )
167+ assert "Usage: %dpip install <package1> <package2> ..." in captured .out
174168 assert "No packages specified." in captured .out
175169
176170
@@ -196,9 +190,7 @@ def test_dpip_no_session(mock_add_artifacts, ipython_shell, capsys):
196190 "addArtifacts" ,
197191 side_effect = Exception ("Install failed" ),
198192)
199- def test_dpip_install_failure (
200- mock_add_artifacts , ipython_shell , capsys
201- ):
193+ def test_dpip_install_failure (mock_add_artifacts , ipython_shell , capsys ):
202194 """Test error message on installation failure."""
203195 ipython_shell .run_line_magic ("dpip" , "install bad-package" )
204196 mock_add_artifacts .assert_called_once_with ("bad-package" , pypi = True )
0 commit comments