diff --git a/tests/test-ssh.t b/tests/test-ssh.t
index 4abfe416925978cce11c0a131801c818d2fd67ba_dGVzdHMvdGVzdC1zc2gudA==..3180ff7f60253ee1d6ae1f4608acb96c60adeef3_dGVzdHMvdGVzdC1zc2gudA== 100644
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -581,5 +581,5 @@
 
 abort with no error hint when there is a ssh problem when pulling
 
-  $ hg pull ssh://brokenrepository
+  $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\""
   pulling from ssh://brokenrepository/
@@ -585,7 +585,6 @@
   pulling from ssh://brokenrepository/
-  remote: ssh: Could not resolve hostname brokenrepository: Name or service not known
   abort: no suitable response from remote hg!
   [255]
 
 abort with configured error hint when there is a ssh problem when pulling
 
@@ -587,7 +586,8 @@
   abort: no suitable response from remote hg!
   [255]
 
 abort with configured error hint when there is a ssh problem when pulling
 
-  $ hg pull ssh://brokenrepository --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
+  $ hg pull ssh://brokenrepository -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" \
+  > --config ui.ssherrorhint="Please see http://company/internalwiki/ssh.html"
   pulling from ssh://brokenrepository/
@@ -593,5 +593,4 @@
   pulling from ssh://brokenrepository/
-  remote: ssh: Could not resolve hostname brokenrepository: Name or service not known
   abort: no suitable response from remote hg!
   (Please see http://company/internalwiki/ssh.html)
   [255]