~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/teststore.py

  • Committer: Robert Collins
  • Date: 2005-10-16 02:25:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1459.
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051016022511-0bd5ebf69bd26bd2
Pull up _relpath with gz suffix for CompressedTextStore into TransportStore

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        if v is None:
46
46
            tester.assert_(f is None)
47
47
        else:
48
 
            tester.assertEquals(f.read(), v)
49
 
    tester.assertEquals(count, len(values))
 
48
            tester.assertEqual(f.read(), v)
 
49
    tester.assertEqual(count, len(values))
50
50
    # We need to check to make sure there are no more
51
51
    # files to be returned, I'm using a cheezy way
52
52
    # Convert to a list, and there shouldn't be any left
53
 
    tester.assertEquals(len(list(files)), 0)
 
53
    tester.assertEqual(len(list(files)), 0)
54
54
 
55
55
 
56
56
def test_multiple_add(tester, store):
82
82
 
83
83
    files = store.get(['d'], permit_failure=True)
84
84
    files = list(files)
85
 
    tester.assertEquals(len(files), 1)
 
85
    tester.assertEqual(len(files), 1)
86
86
    tester.assert_(files[0] is None)
87
87
 
88
88
    check_equals(tester, store, ['a', 'd'], ['hello', None],
238
238
    def test__relpath_simple(self):
239
239
        my_store = store.TransportStore(MockTransport())
240
240
        self.assertEqual("foo", my_store._relpath('foo'))
 
241
 
 
242
    def test__relpath_prefixed(self):
 
243
        my_store = store.TransportStore(MockTransport(), True)
 
244
        self.assertEqual('45/foo', my_store._relpath('foo'))
 
245
 
 
246
    def test__relpath_simple_suffixed(self):
 
247
        my_store = store.TransportStore(MockTransport())
 
248
        self.assertEqual('foo.gz', my_store._relpath('foo', ['gz']))