~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_versionedfile.py

  • Committer: Vincent Ladeuil
  • Date: 2010-05-14 13:22:18 UTC
  • mto: (5234.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5235.
  • Revision ID: v.ladeuil+lp@free.fr-20100514132218-zc7juegem1wq2fsc
Attempt to fix the last (so far :) windows failing test.

* bzrlib/tests/per_versionedfile.py:
(TestReadonlyHttpMixin.test_readonly_http_works): Fix lines too long.
(get_file): Try a windows-friendly open mode.

Show diffs side-by-side

added added

removed removed

Lines of Context:
999
999
        # we should be able to read from http with a versioned file.
1000
1000
        vf = self.get_file()
1001
1001
        # try an empty file access
1002
 
        readonly_vf = self.get_factory()('foo', get_transport(self.get_readonly_url('.')))
 
1002
        readonly_vf = self.get_factory()('foo', get_transport(
 
1003
                self.get_readonly_url('.')))
1003
1004
        self.assertEqual([], readonly_vf.versions())
1004
1005
        # now with feeling.
1005
1006
        vf.add_lines('1', [], ['a\n'])
1006
1007
        vf.add_lines('2', ['1'], ['b\n', 'a\n'])
1007
 
        readonly_vf = self.get_factory()('foo', get_transport(self.get_readonly_url('.')))
 
1008
        readonly_vf = self.get_factory()('foo', get_transport(
 
1009
                self.get_readonly_url('.')))
1008
1010
        self.assertEqual(['1', '2'], vf.versions())
1009
1011
        for version in readonly_vf.versions():
1010
1012
            readonly_vf.get_lines(version)
1014
1016
 
1015
1017
    def get_file(self):
1016
1018
        return WeaveFile('foo', get_transport(self.get_url('.')), create=True,
1017
 
            get_scope=self.get_transaction)
 
1019
            get_scope=self.get_transaction, access_mode='r+')
1018
1020
 
1019
1021
    def get_factory(self):
1020
1022
        return WeaveFile