Skip to content

Commit

Permalink
always use threaded test FTPd
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 23, 2024
1 parent 3cea779 commit 87e081d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.11"]
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v4
Expand Down
35 changes: 17 additions & 18 deletions pyftpdlib/test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
from pyftpdlib.test import SUPPORTS_SENDFILE
from pyftpdlib.test import USER
from pyftpdlib.test import WINDOWS
from pyftpdlib.test import MProcessTestFTPd
from pyftpdlib.test import PyftpdlibTestCase
from pyftpdlib.test import ThreadedTestFTPd
from pyftpdlib.test import close_client
Expand All @@ -69,7 +68,7 @@
class TestFtpAuthentication(PyftpdlibTestCase):
"""Test: USER, PASS, REIN."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -259,7 +258,7 @@ def test_user_during_transfer(self):
class TestFtpDummyCmds(PyftpdlibTestCase):
"""Test: TYPE, STRU, MODE, NOOP, SYST, ALLO, HELP, SITE HELP."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -396,7 +395,7 @@ def mlst():


class TestFtpCmdsSemantic(PyftpdlibTestCase):
server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP
arg_cmds = [
'allo',
Expand Down Expand Up @@ -513,7 +512,7 @@ class TestFtpFsOperations(PyftpdlibTestCase):
STAT, MFMT.
"""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -750,7 +749,7 @@ def write(self, b):
class TestFtpStoreData(PyftpdlibTestCase):
"""Test STOR, STOU, APPE, REST, TYPE."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP
use_sendfile = None
use_custom_io = False
Expand Down Expand Up @@ -1061,7 +1060,7 @@ class TestFtpStoreDataWithCustomIO(TestFtpStoreData):
class TestFtpRetrieveData(PyftpdlibTestCase):
"""Test RETR, REST, TYPE."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP
use_sendfile = None
use_custom_io = False
Expand Down Expand Up @@ -1204,7 +1203,7 @@ class TestFtpRetrieveDataCustomIO(TestFtpRetrieveData):
class TestFtpListingCmds(PyftpdlibTestCase):
"""Test LIST, NLST, argumented STAT."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -1369,7 +1368,7 @@ def test_unforeseen_time_event(self):
class TestFtpAbort(PyftpdlibTestCase):
"""Test: ABOR."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -1457,7 +1456,7 @@ def test_oob_abor(self):
class TestThrottleBandwidth(PyftpdlibTestCase):
"""Test ThrottledDTPHandler class."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -1531,7 +1530,7 @@ class TestTimeouts(PyftpdlibTestCase):
Some tests may fail on slow machines.
"""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -1697,7 +1696,7 @@ def test_disabled_port_timeout(self):
class TestConfigurableOptions(PyftpdlibTestCase):
"""Test those daemon options which are commonly modified by user."""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -1937,7 +1936,7 @@ def test_use_gmt_times(self):


class TestCallbacks(PyftpdlibTestCase):
server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -2250,7 +2249,7 @@ class TestIPv4Environment(_TestNetworkProtocols, PyftpdlibTestCase):
plus some additional specific tests.
"""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP
HOST = '127.0.0.1'

Expand Down Expand Up @@ -2300,7 +2299,7 @@ class TestIPv6Environment(_TestNetworkProtocols, PyftpdlibTestCase):
plus some additional specific tests.
"""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP
HOST = '::1'

Expand Down Expand Up @@ -2336,7 +2335,7 @@ class TestIPv6MixedEnvironment(PyftpdlibTestCase):
manner and try to connect by using an IPv4 client.
"""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP
HOST = "::"

Expand Down Expand Up @@ -2418,7 +2417,7 @@ class TestCornerCases(PyftpdlibTestCase):
mainly referring to bugs signaled on the bug tracker.
"""

server_class = MProcessTestFTPd
server_class = ThreadedTestFTPd
client_class = ftplib.FTP

def setUp(self):
Expand Down Expand Up @@ -2554,7 +2553,7 @@ def test_ioloop_fileno(self):
# """Test FTP commands and responses by using path names with non
# ASCII characters.
# """
# server_class = MProcessTestFTPd
# server_class = ThreadedTestFTPd
# client_class = ftplib.FTP

# def setUp(self):
Expand Down
4 changes: 2 additions & 2 deletions pyftpdlib/test/test_functional_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from pyftpdlib.test import PASSWD
from pyftpdlib.test import USER
from pyftpdlib.test import WINDOWS
from pyftpdlib.test import MProcessTestFTPd
from pyftpdlib.test import PyftpdlibTestCase
from pyftpdlib.test import ThreadedTestFTPd
from pyftpdlib.test import close_client
from pyftpdlib.test.test_functional import TestConfigurableOptions
from pyftpdlib.test.test_functional import TestCornerCases
Expand Down Expand Up @@ -64,7 +64,7 @@ def login(self, *args, **kwargs):
self.prot_p()


class FTPSServer(MProcessTestFTPd):
class FTPSServer(ThreadedTestFTPd):
"""A threaded FTPS server used for functional testing."""

handler = TLS_FTPHandler
Expand Down

0 comments on commit 87e081d

Please sign in to comment.