~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

Move check_mode to TestCase.assertMode to make it generally accessible.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                              )
32
32
 
33
33
 
34
 
if sys.platform != 'win32':
35
 
    def check_mode(test, path, mode):
36
 
        """Check that a particular path has the correct mode."""
37
 
        actual_mode = stat.S_IMODE(os.stat(path).st_mode)
38
 
        test.assertEqual(mode, actual_mode,
39
 
            'mode of %r incorrect (%o != %o)' % (path, mode, actual_mode))
40
 
else:
41
 
    def check_mode(test, path, mode):
42
 
        """On win32 chmod doesn't have any effect, 
43
 
        so don't actually check anything
44
 
        """
45
 
        return
46
 
 
47
 
 
48
34
class TestTransport(TestCase):
49
35
    """Test the non transport-concrete class functionality."""
50
36