/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: 2009-04-01 00:40:12 UTC
  • mto: (0.436.139 foreign)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: jelmer@samba.org-20090401004012-0jh76d6efr5dvltv
Run TestCase.setUp().

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
 
1
# Copyright (C) 2005-2009 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 3 of the License, or
 
5
# the Free Software Foundation; either version 2 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 osutils
17
 
from bzrlib.tests import TestCase
 
16
from bzrlib import (
 
17
    osutils,
 
18
    )
 
19
from bzrlib.tests import (
 
20
    TestCase,
 
21
    )
18
22
 
19
 
from versionedfiles import (VirtualRevisionTexts, VirtualInventoryTexts, 
20
 
                            VirtualSignatureTexts)
 
23
from versionedfiles import (
 
24
    VirtualInventoryTexts,
 
25
    VirtualRevisionTexts,
 
26
    VirtualSignatureTexts,
 
27
    )
21
28
 
22
29
 
23
30
class BasicTextsTests:
 
31
 
24
32
    def test_add_lines(self):
25
33
        self.assertRaises(NotImplementedError, 
26
34
                self.texts.add_lines, "foo", [], [])
38
46
 
39
47
 
40
48
class VirtualRevisionTextsTests(TestCase, BasicTextsTests):
 
49
 
41
50
    def _make_parents_provider(self):
42
51
        return self
43
52
 
44
53
    def setUp(self):
 
54
        TestCase.setUp(self)
45
55
        self.texts = VirtualRevisionTexts(self)
46
56
 
47
57
    def get_parent_map(self, keys):
49
59
 
50
60
 
51
61
class VirtualInventoryTextsTests(TestCase, BasicTextsTests):
 
62
 
52
63
    def _make_parents_provider(self):
53
64
        return self
54
65
 
59
70
        return {("A",): (("B",))}
60
71
 
61
72
    def setUp(self):
 
73
        TestCase.setUp(self)
62
74
        self.texts = VirtualInventoryTexts(self)
63
75
 
64
76
    def test_get_sha1s(self):
66
78
 
67
79
 
68
80
class VirtualSignatureTextsTests(TestCase, BasicTextsTests):
 
81
 
69
82
    def _make_parents_provider(self):
70
83
        return self
71
84
 
72
85
    def setUp(self):
 
86
        TestCase.setUp(self)
73
87
        self.texts = VirtualSignatureTexts(self)
74
88
 
75
89
    def get_parent_map(self, keys):