~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_transport.py

  • Committer: Joe Julian
  • Date: 2010-01-10 02:25:31 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: joe@julianfamily.org-20100110022531-wqk61rsagz8xsiga
Added MANIFEST.in to allow bdist_rpm to have all the required include files and tools. bdist_rpm will still fail to build correctly on some distributions due to a disttools bug http://bugs.python.org/issue644744

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
        for content, f in itertools.izip(contents, content_f):
204
204
            self.assertEqual(content, f.read())
205
205
 
 
206
    def test_get_unknown_file(self):
 
207
        t = self.get_transport()
 
208
        files = ['a', 'b']
 
209
        contents = ['contents of a\n',
 
210
                    'contents of b\n',
 
211
                    ]
 
212
        self.build_tree(files, transport=t, line_endings='binary')
206
213
        self.assertRaises(NoSuchFile, t.get, 'c')
207
214
        self.assertListRaises(NoSuchFile, t.get_multi, ['a', 'b', 'c'])
208
215
        self.assertListRaises(NoSuchFile, t.get_multi, iter(['a', 'b', 'c']))
242
249
        for content, fname in zip(contents, files):
243
250
            self.assertEqual(content, t.get_bytes(fname))
244
251
 
 
252
    def test_get_bytes_unknown_file(self):
 
253
        t = self.get_transport()
 
254
 
245
255
        self.assertRaises(NoSuchFile, t.get_bytes, 'c')
246
256
 
247
257
    def test_get_with_open_write_stream_sees_all_content(self):
674
684
            for f in files:
675
685
                self.assertTransportMode(temp_transport, f, mode)
676
686
 
 
687
    def test_create_prefix(self):
 
688
        t = self.get_transport()
 
689
        sub = t.clone('foo').clone('bar')
 
690
        try:
 
691
            sub.create_prefix()
 
692
        except TransportNotPossible:
 
693
            self.assertTrue(t.is_readonly())
 
694
        else:
 
695
            self.assertTrue(t.has('foo/bar'))
 
696
 
677
697
    def test_append_file(self):
678
698
        t = self.get_transport()
679
699