~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

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
 
16
17
"""
17
18
Facilities to use ftp test servers.
18
19
"""
20
21
import sys
21
22
 
22
23
from bzrlib import tests
 
24
from bzrlib.tests import (
 
25
    features,
 
26
    )
23
27
 
24
28
 
25
29
try:
37
41
 
38
42
try:
39
43
    from bzrlib.tests.ftp_server import pyftpdlib_based
40
 
    pyftpdlib_available = True
 
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
41
49
except ImportError:
42
50
    pyftpdlib_available = False
43
51
 
44
52
 
45
 
class _FTPServerFeature(tests.Feature):
 
53
class _FTPServerFeature(features.Feature):
46
54
    """Some tests want an FTP Server, check if one is available.
47
55
 
48
56
    Right now, the only way this is available is if one of the following is