/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 bzrlib/tests/blackbox/test_check.py

  • Committer: Robert Collins
  • Date: 2010-05-05 00:05:29 UTC
  • mto: This revision was merged to the branch mainline in revision 5206.
  • Revision ID: robertc@robertcollins.net-20100505000529-ltmllyms5watqj5u
Make 'pydoc bzrlib.tests.build_tree_shape' useful.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007-2010 Canonical Ltd
 
1
# Copyright (C) 2007, 2009 Canonical Ltd
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
16
16
 
17
17
"""Tests for the 'check' CLI command."""
18
18
 
19
 
from breezy.tests import ChrootedTestCase
20
 
from breezy.tests import TestCaseWithTransport
21
 
 
22
 
 
23
 
class TestCheck(TestCaseWithTransport):
 
19
from bzrlib.tests import ChrootedTestCase
 
20
from bzrlib.tests.blackbox import ExternalBase
 
21
 
 
22
 
 
23
class TestCheck(ExternalBase):
24
24
 
25
25
    def test_check_no_tree(self):
26
26
        self.make_branch('.')
40
40
        self.assertContainsRe(err, r"checked repository.*\n"
41
41
                                   r"     1 revisions\n"
42
42
                                   r"     [01] file-ids\n"
43
 
                              )
 
43
                                   )
44
44
        self.assertContainsRe(err, r"Checking branch at '.*'\.\n")
45
45
        self.assertContainsRe(err, r"checked branch.*")
46
46
 
59
59
                                   r"checked repository.*\n"
60
60
                                   r"     1 revisions\n"
61
61
                                   r"     [01] file-ids\n"
62
 
                              )
 
62
                                   )
63
63
 
64
64
    def test_check_tree(self):
65
65
        tree = self.make_branch_and_tree('.')
84
84
        branch = self.make_branch('.')
85
85
        out, err = self.run_bzr('check --tree --branch')
86
86
        self.assertContainsRe(err,
87
 
                              r"Checking branch at '.*'\.\n"
88
 
                              r"No working tree found at specified location\.\n"
89
 
                              r"checked branch.*")
 
87
            r"Checking branch at '.*'\.\n"
 
88
            r"No working tree found at specified location\.\n"
 
89
            r"checked branch.*")
90
90
 
91
91
    def test_check_missing_branch_in_shared_repo(self):
92
92
        self.make_repository('shared', shared=True)