File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33from __future__ import print_function
44from __future__ import unicode_literals
55
6- import threading
6+ import socket
77import ftplib
88import os
99import platform
1010import shutil
11- import subprocess
12- import sys
1311import tempfile
1412import time
1513import unittest
1614import uuid
1715
1816from six import text_type
19- from six .moves .urllib .request import urlopen
2017
2118from ftplib import error_perm
2219from ftplib import error_temp
2320
2421from pyftpdlib .authorizers import DummyAuthorizer
25- from pyftpdlib .handlers import FTPHandler
2622
2723from fs import errors
2824from fs .opener import open_fs
3228from nose .plugins .attrib import attr
3329
3430
31+ # Prevent socket timeouts from slowing tests too much
32+ socket .setdefaulttimeout (1 )
33+
34+
3535class TestFTPFSClass (unittest .TestCase ):
3636
3737 def test_parse_ftp_time (self ):
@@ -133,7 +133,7 @@ def test_ftp_url(self):
133133 def test_host (self ):
134134 self .assertEqual (self .fs .host , self .server .host )
135135
136- @attr ('slow' )
136+ # @attr('slow')
137137 def test_connection_error (self ):
138138 fs = FTPFS ('ftp.not.a.chance' , timeout = 1 )
139139 with self .assertRaises (errors .RemoteConnectionError ):
You can’t perform that action at this time.
0 commit comments