~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Martin Pool
  • Date: 2006-03-10 06:29:53 UTC
  • mfrom: (1608 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1611.
  • Revision ID: mbp@sourcefrog.net-20060310062953-bc1c7ade75c89a7a
[merge] bzr.dev; pycurl not updated for readv yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
# little as possible, so this should be used rarely if it's added at all.
22
22
# (Suggestion from j-a-meinel, 2005-11-24)
23
23
 
 
24
# NOTE: Some classes in here use camelCaseNaming() rather than
 
25
# underscore_naming().  That's for consistency with unittest; it's not the
 
26
# general style of bzrlib.  Please continue that consistency when adding e.g.
 
27
# new assertFoo() methods.
 
28
 
24
29
import codecs
25
30
from cStringIO import StringIO
26
31
import difflib
84
89
    import bzrlib.tests.branch_implementations
85
90
    import bzrlib.tests.bzrdir_implementations
86
91
    import bzrlib.tests.interrepository_implementations
 
92
    import bzrlib.tests.interversionedfile_implementations
87
93
    import bzrlib.tests.repository_implementations
 
94
    import bzrlib.tests.revisionstore_implementations
88
95
    import bzrlib.tests.workingtree_implementations
89
96
    return [
90
97
            bzrlib.doc,
92
99
            bzrlib.tests.branch_implementations,
93
100
            bzrlib.tests.bzrdir_implementations,
94
101
            bzrlib.tests.interrepository_implementations,
 
102
            bzrlib.tests.interversionedfile_implementations,
95
103
            bzrlib.tests.repository_implementations,
 
104
            bzrlib.tests.revisionstore_implementations,
96
105
            bzrlib.tests.workingtree_implementations,
97
106
            ]
98
107
 
809
818
            # TODO: rbc 20060208
810
819
            return WorkingTreeFormat2().initialize(bzrdir.BzrDir.open(relpath))
811
820
 
 
821
    def assertIsDirectory(self, relpath, transport):
 
822
        """Assert that relpath within transport is a directory.
 
823
 
 
824
        This may not be possible on all transports; in that case it propagates
 
825
        a TransportNotPossible.
 
826
        """
 
827
        try:
 
828
            mode = transport.stat(relpath).st_mode
 
829
        except errors.NoSuchFile:
 
830
            self.fail("path %s is not a directory; no such file"
 
831
                      % (relpath))
 
832
        if not stat.S_ISDIR(mode):
 
833
            self.fail("path %s is not a directory; has mode %#o"
 
834
                      % (relpath, mode))
 
835
 
812
836
 
813
837
class ChrootedTestCase(TestCaseWithTransport):
814
838
    """A support class that provides readonly urls outside the local namespace.
912
936
                   'bzrlib.tests.test_http',
913
937
                   'bzrlib.tests.test_identitymap',
914
938
                   'bzrlib.tests.test_inv',
 
939
                   'bzrlib.tests.test_knit',
915
940
                   'bzrlib.tests.test_lockdir',
916
941
                   'bzrlib.tests.test_lockable_files',
917
942
                   'bzrlib.tests.test_log',
925
950
                   'bzrlib.tests.test_osutils',
926
951
                   'bzrlib.tests.test_permissions',
927
952
                   'bzrlib.tests.test_plugins',
 
953
                   'bzrlib.tests.test_progress',
928
954
                   'bzrlib.tests.test_reconcile',
929
955
                   'bzrlib.tests.test_repository',
930
956
                   'bzrlib.tests.test_revision',
931
957
                   'bzrlib.tests.test_revisionnamespaces',
932
958
                   'bzrlib.tests.test_revprops',
933
 
                   'bzrlib.tests.test_reweave',
934
959
                   'bzrlib.tests.test_rio',
935
960
                   'bzrlib.tests.test_sampler',
936
961
                   'bzrlib.tests.test_selftest',
949
974
                   'bzrlib.tests.test_ui',
950
975
                   'bzrlib.tests.test_uncommit',
951
976
                   'bzrlib.tests.test_upgrade',
 
977
                   'bzrlib.tests.test_versionedfile',
952
978
                   'bzrlib.tests.test_weave',
953
979
                   'bzrlib.tests.test_whitebox',
954
980
                   'bzrlib.tests.test_workingtree',