~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_store.py

  • Committer: Robert Collins
  • Date: 2006-01-02 22:37:32 UTC
  • mfrom: (1185.50.33 bzr-jam-integration)
  • Revision ID: robertc@robertcollins.net-20060102223732-d5221b37ff0f7888
Merge in John Meinels integration branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        self.assertEqual(store.total_size(), (2, 55))
93
93
        
94
94
    def test__relpath_suffixed(self):
95
 
        my_store = TextStore(MockTransport(), True, compressed=True)
 
95
        my_store = TextStore(MockTransport(),
 
96
                             prefixed=True, compressed=True)
96
97
        my_store.register_suffix('dsc')
97
98
        self.assertEqual('45/foo.dsc', my_store._relpath('foo', ['dsc']))
98
99
 
357
358
                         my_store.get('missing', 'sig').read())
358
359
 
359
360
    def test___iter__no_suffix(self):
360
 
        my_store = TextStore(MemoryTransport(), False, compressed=False)
 
361
        my_store = TextStore(MemoryTransport(),
 
362
                             prefixed=False, compressed=False)
361
363
        stream = StringIO("content")
362
364
        my_store.add(stream, "foo")
363
365
        self.assertEqual(set(['foo']),
382
384
 
383
385
    def test_copy_suffixes(self):
384
386
        from_store = self.get_populated_store()
385
 
        to_store = TextStore(MemoryTransport(), True, compressed=True)
 
387
        to_store = TextStore(MemoryTransport(),
 
388
                             prefixed=True, compressed=True)
386
389
        to_store.register_suffix('sig')
387
390
        copy_all(from_store, to_store)
388
391
        self.assertEqual(1, len(to_store))