/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to test_versionedfiles.py

  • Committer: Jelmer Vernooij
  • Date: 2008-08-29 15:51:57 UTC
  • mto: (0.219.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20080829155157-l5fyndavfxy93zan
Add abstract functions for converting revision ids between bzr and foreign vcses.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2009 Jelmer Vernooij <jelmer@samba.org>
 
1
# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
 
# the Free Software Foundation; either version 2 of the License, or
 
5
# the Free Software Foundation; either version 3 of the License, or
6
6
# (at your option) any later version.
7
7
 
8
8
# This program is distributed in the hope that it will be useful,
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 
16
 
from bzrlib import (
17
 
    osutils,
18
 
    )
19
 
from bzrlib.tests import (
20
 
    TestCase,
21
 
    )
 
16
from bzrlib import osutils
 
17
from bzrlib.tests import TestCase
22
18
 
23
 
from versionedfiles import (
24
 
    VirtualInventoryTexts,
25
 
    VirtualRevisionTexts,
26
 
    VirtualSignatureTexts,
27
 
    )
 
19
from versionedfiles import (VirtualRevisionTexts, VirtualInventoryTexts, 
 
20
                            VirtualSignatureTexts)
28
21
 
29
22
 
30
23
class BasicTextsTests:
31
 
 
32
24
    def test_add_lines(self):
33
25
        self.assertRaises(NotImplementedError, 
34
26
                self.texts.add_lines, "foo", [], [])
46
38
 
47
39
 
48
40
class VirtualRevisionTextsTests(TestCase, BasicTextsTests):
49
 
 
50
41
    def _make_parents_provider(self):
51
42
        return self
52
43
 
53
44
    def setUp(self):
54
 
        TestCase.setUp(self)
55
45
        self.texts = VirtualRevisionTexts(self)
56
46
 
57
47
    def get_parent_map(self, keys):
59
49
 
60
50
 
61
51
class VirtualInventoryTextsTests(TestCase, BasicTextsTests):
62
 
 
63
52
    def _make_parents_provider(self):
64
53
        return self
65
54
 
70
59
        return {("A",): (("B",))}
71
60
 
72
61
    def setUp(self):
73
 
        TestCase.setUp(self)
74
62
        self.texts = VirtualInventoryTexts(self)
75
63
 
76
64
    def test_get_sha1s(self):
78
66
 
79
67
 
80
68
class VirtualSignatureTextsTests(TestCase, BasicTextsTests):
81
 
 
82
69
    def _make_parents_provider(self):
83
70
        return self
84
71
 
85
72
    def setUp(self):
86
 
        TestCase.setUp(self)
87
73
        self.texts = VirtualSignatureTexts(self)
88
74
 
89
75
    def get_parent_map(self, keys):