Update test compat with pyftpdlib>=1.5.10 by mweinelt · Pull Request #591 · PyFilesystem/pyfilesystem2

This seems to be on the right track, but doesn’t seem quite right at the moment. It looks like pyftpdlib 1.5.10 still has ThreadedTestFTPd, and FtpdThreadWrapper was introduced in pyftpdlib 2.0.

https://github.com/giampaolo/pyftpdlib/blob/3cea779de3ccb5ab5744220de3bddb3d4ff10f35/pyftpdlib/test/__init__.py#L445

Also, there is another use of ThreadedTestFTPd in TestAnonFTPFS that needs to be adjusted:

@mark.slow
@unittest.skipIf(platform.python_implementation() == "PyPy", "ftp unreliable with PyPy")
class TestAnonFTPFS(FSTestCases, unittest.TestCase):
user = "anonymous"
pasw = ""
@classmethod
def setUpClass(cls):
from pyftpdlib.test import ThreadedTestFTPd
super(TestAnonFTPFS, cls).setUpClass()
cls._temp_dir = tempfile.mkdtemp("ftpfs2tests")
cls._temp_path = os.path.join(cls._temp_dir, text_type(uuid.uuid4()))
os.mkdir(cls._temp_path)
cls.server = ThreadedTestFTPd()

I used this PR as inspiration for #595.