~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

merge bzr.dev r4171

Show diffs side-by-side

added added

removed removed

Lines of Context:
1017
1017
        path_stat = transport.stat(path)
1018
1018
        actual_mode = stat.S_IMODE(path_stat.st_mode)
1019
1019
        self.assertEqual(mode, actual_mode,
1020
 
            'mode of %r incorrect (%o != %o)' % (path, mode, actual_mode))
 
1020
                         'mode of %r incorrect (%s != %s)'
 
1021
                         % (path, oct(mode), oct(actual_mode)))
1021
1022
 
1022
1023
    def assertIsSameRealPath(self, path1, path2):
1023
1024
        """Fail if path1 and path2 points to different files"""
3421
3422
    return None
3422
3423
 
3423
3424
 
3424
 
class _FTPServerFeature(Feature):
3425
 
    """Some tests want an FTP Server, check if one is available.
3426
 
 
3427
 
    Right now, the only way this is available is if 'medusa' is installed.
3428
 
    http://www.amk.ca/python/code/medusa.html
3429
 
    """
3430
 
 
3431
 
    def _probe(self):
3432
 
        try:
3433
 
            import bzrlib.tests.ftp_server
3434
 
            return True
3435
 
        except ImportError:
3436
 
            return False
3437
 
 
3438
 
    def feature_name(self):
3439
 
        return 'FTPServer'
3440
 
 
3441
 
 
3442
 
FTPServerFeature = _FTPServerFeature()
3443
 
 
3444
 
 
3445
3425
class _HTTPSServerFeature(Feature):
3446
3426
    """Some tests want an https Server, check if one is available.
3447
3427