~bzr-pqm/bzr/bzr.dev

5080.3.1 by Vincent Ladeuil
Cleanup imports in bzrlib/tests/per_tree/test_revision_tree.py.
1
# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
1908.11.2 by Robert Collins
Implement WorkingTree interface conformance tests for
2
#
3
# This program is free software; you can redistribute it and/or modify
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
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
4183.7.1 by Sabin Iacob
update FSF mailing address
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1908.11.2 by Robert Collins
Implement WorkingTree interface conformance tests for
16
17
"""Tests for Tree.revision_tree."""
18
5080.3.1 by Vincent Ladeuil
Cleanup imports in bzrlib/tests/per_tree/test_revision_tree.py.
19
from bzrlib import (
20
    errors,
21
    tests,
22
    )
23
from bzrlib.tests import per_tree
24
25
26
class TestRevisionTree(per_tree.TestCaseWithTree):
1908.11.2 by Robert Collins
Implement WorkingTree interface conformance tests for
27
28
    def create_tree_no_parents_no_content(self):
29
        tree = self.make_branch_and_tree('.')
30
        return self.get_tree_no_parents_no_content(tree)
31
32
    def test_get_random_tree_raises(self):
33
        test_tree = self.create_tree_no_parents_no_content()
34
        self.assertRaises(errors.NoSuchRevision, test_tree.revision_tree,
35
            'this-should-not-exist')