rdobuilder 7409d8
--- a/dev-requirements.txt
rdobuilder 7409d8
+++ b/dev-requirements.txt
rdobuilder 7409d8
@@ -2,7 +2,6 @@
rdobuilder 7409d8
 invoke==1.6.0
rdobuilder 7409d8
 invocations==2.3.0
rdobuilder 7409d8
 pytest==4.4.2
rdobuilder 7409d8
-pytest-relaxed==1.1.5
rdobuilder 7409d8
 # pytest-xdist for test dir watching and the inv guard task
rdobuilder 7409d8
 pytest-xdist==1.28.0
rdobuilder 7409d8
 mock==2.0.0
rdobuilder 7409d8
--- a/pytest.ini
rdobuilder 7409d8
+++ b/pytest.ini
rdobuilder 7409d8
@@ -1,7 +1,4 @@
rdobuilder 7409d8
 [pytest]
rdobuilder 7409d8
-# We use pytest-relaxed just for its utils at the moment, so disable it at the
rdobuilder 7409d8
-# plugin level until we adapt test organization to really use it.
rdobuilder 7409d8
-addopts = -p no:relaxed
rdobuilder 7409d8
 # Loop on failure
rdobuilder 7409d8
 looponfailroots = tests paramiko
rdobuilder 7409d8
 # Ignore some warnings we cannot easily handle.
rdobuilder 7409d8
--- a/tests/test_client.py
rdobuilder 7409d8
+++ b/tests/test_client.py
rdobuilder 7409d8
@@ -33,7 +33,7 @@ import warnings
rdobuilder 7409d8
 import weakref
rdobuilder 7409d8
 from tempfile import mkstemp
rdobuilder 7409d8
 
rdobuilder 7409d8
-from pytest_relaxed import raises
rdobuilder 7409d8
+import pytest
rdobuilder 7409d8
 from mock import patch, Mock
rdobuilder 7409d8
 
rdobuilder 7409d8
 import paramiko
rdobuilder 7409d8
@@ -687,10 +687,10 @@ class PasswordPassphraseTests(ClientTest
rdobuilder 7409d8
 
rdobuilder 7409d8
     # TODO: more granular exception pending #387; should be signaling "no auth
rdobuilder 7409d8
     # methods available" because no key and no password
rdobuilder 7409d8
-    @raises(SSHException)
rdobuilder 7409d8
     def test_passphrase_kwarg_not_used_for_password_auth(self):
rdobuilder 7409d8
-        # Using the "right" password in the "wrong" field shouldn't work.
rdobuilder 7409d8
-        self._test_connection(passphrase="pygmalion")
rdobuilder 7409d8
+        with pytest.raises(SSHException):
rdobuilder 7409d8
+            # Using the "right" password in the "wrong" field shouldn't work.
rdobuilder 7409d8
+            self._test_connection(passphrase="pygmalion")
rdobuilder 7409d8
 
rdobuilder 7409d8
     def test_passphrase_kwarg_used_for_key_passphrase(self):
rdobuilder 7409d8
         # Straightforward again, with new passphrase kwarg.
rdobuilder 7409d8
@@ -708,14 +708,14 @@ class PasswordPassphraseTests(ClientTest
rdobuilder 7409d8
             password="television",
rdobuilder 7409d8
         )
rdobuilder 7409d8
 
rdobuilder 7409d8
-    @raises(AuthenticationException)  # TODO: more granular
rdobuilder 7409d8
     def test_password_kwarg_not_used_for_passphrase_when_passphrase_kwarg_given(  # noqa
rdobuilder 7409d8
         self
rdobuilder 7409d8
     ):
rdobuilder 7409d8
         # Sanity: if we're given both fields, the password field is NOT used as
rdobuilder 7409d8
         # a passphrase.
rdobuilder 7409d8
-        self._test_connection(
rdobuilder 7409d8
-            key_filename=_support("test_rsa_password.key"),
rdobuilder 7409d8
-            password="television",
rdobuilder 7409d8
-            passphrase="wat? lol no",
rdobuilder 7409d8
-        )
rdobuilder 7409d8
+        with pytest.raises(AuthenticationException):
rdobuilder 7409d8
+            self._test_connection(
rdobuilder 7409d8
+                key_filename=_support("test_rsa_password.key"),
rdobuilder 7409d8
+                password="television",
rdobuilder 7409d8
+                passphrase="wat? lol no",
rdobuilder 7409d8
+            )