~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

Merge tarball branch that's already with PQM, resolving conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
721
721
    def get_non_echoed_password(self, prompt):
722
722
        """Get password from stdin without trying to handle the echo mode"""
723
723
        if prompt:
724
 
            self.stdout.write(prompt.encode(self.stdout.encoding, 'replace'))
 
724
            self.stdout.write(prompt)
725
725
        password = self.stdin.readline()
726
726
        if not password:
727
727
            raise EOFError
823
823
            message += '\n'
824
824
        raise AssertionError("%snot equal:\na = %s\nb = %s\n"
825
825
            % (message,
826
 
               pformat(a), pformat(b)))
 
826
               pformat(a, indent=4), pformat(b, indent=4)))
827
827
 
828
828
    assertEquals = assertEqual
829
829
 
1805
1805
            segments = maybe_a_url.rsplit('/', 1)
1806
1806
            t = get_transport(maybe_a_url)
1807
1807
            if len(segments) > 1 and segments[-1] not in ('', '.'):
1808
 
                t.ensure_base()
 
1808
                try:
 
1809
                    t.mkdir('.')
 
1810
                except errors.FileExists:
 
1811
                    pass
1809
1812
            if format is None:
1810
1813
                format = 'default'
1811
1814
            if isinstance(format, basestring):
1961
1964
    def assertFileEqual(self, content, path):
1962
1965
        """Fail if path does not contain 'content'."""
1963
1966
        self.failUnlessExists(path)
1964
 
        f = file(path, 'rb')
 
1967
        # TODO: jam 20060427 Shouldn't this be 'rb'?
 
1968
        f = file(path, 'r')
1965
1969
        try:
1966
1970
            s = f.read()
1967
1971
        finally:
2277
2281
                   'bzrlib.tests.test_commit_merge',
2278
2282
                   'bzrlib.tests.test_config',
2279
2283
                   'bzrlib.tests.test_conflicts',
2280
 
                   'bzrlib.tests.test_counted_lock',
2281
2284
                   'bzrlib.tests.test_decorators',
2282
2285
                   'bzrlib.tests.test_delta',
2283
2286
                   'bzrlib.tests.test_diff',
2306
2309
                   'bzrlib.tests.test_lockdir',
2307
2310
                   'bzrlib.tests.test_lockable_files',
2308
2311
                   'bzrlib.tests.test_log',
2309
 
                   'bzrlib.tests.test_lsprof',
2310
2312
                   'bzrlib.tests.test_memorytree',
2311
2313
                   'bzrlib.tests.test_merge',
2312
2314
                   'bzrlib.tests.test_merge3',