~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/ftp_server/__init__.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 08:15:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101008081514-dviqzrdfwyzsqbz2
Split NEWS into per-release doc/en/release-notes/bzr-*.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
 
 
17
16
"""
18
17
Facilities to use ftp test servers.
19
18
"""
21
20
import sys
22
21
 
23
22
from bzrlib import tests
24
 
from bzrlib.tests import (
25
 
    features,
26
 
    )
27
23
 
28
24
 
29
25
try:
30
26
    from bzrlib.tests.ftp_server import medusa_based
31
 
    # medusa is bogus starting with python2.6, since we don't support earlier
32
 
    # pythons anymore, it's currently useless. There is hope though that the
33
 
    # unicode bugs get fixed in the future so we leave it disabled until
34
 
    # then. Keeping the framework in place means that only the following line
35
 
    # will need to be changed.  The last tests were conducted with medusa-2.0
36
 
    # -- vila 20110607
37
 
    medusa_available = False
 
27
    # medusa is bogus under python2.6
 
28
    medusa_available = sys.version_info < (2, 6)
38
29
except ImportError:
39
30
    medusa_available = False
40
31
 
41
32
 
42
33
try:
43
34
    from bzrlib.tests.ftp_server import pyftpdlib_based
44
 
    if pyftpdlib_based.pyftplib_version >= (0, 7, 0):
45
 
        pyftpdlib_available = True
46
 
    else:
47
 
        # 0.6.0 breaks SITE CHMOD
48
 
        pyftpdlib_available = False
 
35
    pyftpdlib_available = True
49
36
except ImportError:
50
37
    pyftpdlib_available = False
51
38
 
52
39
 
53
 
class _FTPServerFeature(features.Feature):
 
40
class _FTPServerFeature(tests.Feature):
54
41
    """Some tests want an FTP Server, check if one is available.
55
42
 
56
43
    Right now, the only way this is available is if one of the following is