@@ -158,7 +158,7 @@ def fake_run(command: tuple[str, ...], **_kwargs: Any) -> subprocess.CompletedPr
158158
159159def test_install_json_failure (monkeypatch : Any ) -> None :
160160 def fake_run (command : tuple [str , ...], ** _kwargs : Any ) -> subprocess .CompletedProcess [str ]:
161- return_code = 1 if command [ 0 ] == "patchright" else 0
161+ return_code = 1 if "patchright" in command else 0
162162 return subprocess .CompletedProcess (
163163 command ,
164164 return_code ,
@@ -180,7 +180,7 @@ def fake_run(command: tuple[str, ...], **_kwargs: Any) -> subprocess.CompletedPr
180180
181181def test_install_json_handles_missing_executable (monkeypatch : Any ) -> None :
182182 def fake_run (command : tuple [str , ...], ** _kwargs : Any ) -> subprocess .CompletedProcess [str ]:
183- if command [ 0 ] == "patchright" :
183+ if "patchright" in command :
184184 raise FileNotFoundError ("missing patchright" )
185185 return subprocess .CompletedProcess (command , 0 , stdout = "installed" , stderr = "" )
186186
@@ -206,6 +206,6 @@ def fake_run(command: tuple[str, ...], **_kwargs: Any) -> subprocess.CompletedPr
206206 assert result .exit_code == 0 , result .output
207207 assert "OK:" in result .output
208208 assert "playwright" in result .output
209+ assert "patchright" in result .output
209210 assert "install" in result .output
210211 assert "chromium" in result .output
211- assert "patchright install chromium" in result .output
0 commit comments