Skip to content

Commit

Permalink
skip test on py 2
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 21, 2024
1 parent 9aa0b28 commit 95e5c65
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pyftpdlib/test/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -2758,7 +2758,7 @@ def connect_client(self):
self.client.login(USER, PASSWD)

@retry_on_failure()
@pytest.mark.skipif(PY3, reason="PY2 only")
@pytest.mark.skipif(not PY3, reason="PY3 only")
def test_unforeseen_mdtm_event(self):
# Emulate a case where the file last modification time is prior
# to year 1900. This most likely will never happen unless
Expand All @@ -2769,9 +2769,6 @@ def test_unforeseen_mdtm_event(self):
# It causes time.localtime/gmtime to raise a ValueError exception
# which is supposed to be handled by server.

# On python 3 it seems that the trick of replacing the original
# method with the lambda doesn't work.

class TestFS(AbstractedFS):
def getmtime(self, *args, **kwargs):
return -9000000000
Expand Down

0 comments on commit 95e5c65

Please sign in to comment.