~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_versionedfile.py

  • Committer: Robert Collins
  • Date: 2006-03-02 07:08:36 UTC
  • mto: (1594.2.4 integration)
  • mto: This revision was merged to the branch mainline in revision 1596.
  • Revision ID: robertc@robertcollins.net-20060302070836-be71595e05a607b7
remove the weavestore assumptions about the number and nature of files it manages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
111
111
        self.assertEqual([], new_f.versions())
112
112
        self.assertTrue(isinstance(new_f, f.__class__))
113
113
 
 
114
    def test_copy_to(self):
 
115
        f = self.get_file()
 
116
        f.add_lines('0', [], ['a\n'])
 
117
        t = MemoryTransport()
 
118
        f.copy_to('foo', t)
 
119
        for suffix in f.__class__.get_suffixes():
 
120
            self.assertTrue(t.has('foo' + suffix))
 
121
 
 
122
    def test_get_suffixes(self):
 
123
        f = self.get_file()
 
124
        # should be the same
 
125
        self.assertEqual(f.__class__.get_suffixes(), f.__class__.get_suffixes())
 
126
        # and should be a list
 
127
        self.assertTrue(isinstance(f.__class__.get_suffixes(), list))
 
128
 
114
129
    def test_get_graph(self):
115
130
        f = self.get_file()
116
131
        f.add_lines('v1', [], ['hello\n'])