diff --git a/tests/requirements.txt b/tests/requirements.txt index b7ff3ce4..0db1f97b 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,14 +1,10 @@ # the bare requirements for running tests # pyftpdlib is needed to spawn a FTP server for the -# FTPFS test suite -pyftpdlib ~=1.5 - -# these are optional dependencies for pyftpdlib that -# are not explicitly listed, we need to install these -# ourselves -psutil ~=5.0 -pysendfile ~=2.0 ; python_version <= "3.3" +# FTPFS test suite; we import from pyftpdlib.test, so +# we need (at least some of) pyftpdlib's test +# dependencies +pyftpdlib[test] ~=2.0 # mock is only available from Python 3.3 onward, and # mock v4+ doesn't support Python 2.7 anymore diff --git a/tests/test_ftpfs.py b/tests/test_ftpfs.py index 2bb2c73c..a3cfb04a 100644 --- a/tests/test_ftpfs.py +++ b/tests/test_ftpfs.py @@ -146,7 +146,7 @@ class TestFTPFS(FSTestCases, unittest.TestCase): @classmethod def setUpClass(cls): - from pyftpdlib.test import ThreadedTestFTPd + from pyftpdlib.test import FtpdThreadWrapper super(TestFTPFS, cls).setUpClass() @@ -154,7 +154,7 @@ def setUpClass(cls): cls._temp_path = os.path.join(cls._temp_dir, text_type(uuid.uuid4())) os.mkdir(cls._temp_path) - cls.server = ThreadedTestFTPd() + cls.server = FtpdThreadWrapper() cls.server.shutdown_after = -1 cls.server.handler.authorizer = DummyAuthorizer() cls.server.handler.authorizer.add_user( @@ -336,7 +336,7 @@ class TestAnonFTPFS(FSTestCases, unittest.TestCase): @classmethod def setUpClass(cls): - from pyftpdlib.test import ThreadedTestFTPd + from pyftpdlib.test import FtpdThreadWrapper super(TestAnonFTPFS, cls).setUpClass() @@ -344,7 +344,7 @@ def setUpClass(cls): cls._temp_path = os.path.join(cls._temp_dir, text_type(uuid.uuid4())) os.mkdir(cls._temp_path) - cls.server = ThreadedTestFTPd() + cls.server = FtpdThreadWrapper() cls.server.shutdown_after = -1 cls.server.handler.authorizer = DummyAuthorizer() cls.server.handler.authorizer.add_anonymous(cls._temp_path, perm="elradfmw")