~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branches.py

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2011, 2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2011 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
17
17
 
18
18
"""Black-box tests for bzr branches."""
19
19
 
20
 
from bzrlib.bzrdir import BzrDir
21
20
from bzrlib.tests import TestCaseWithTransport
22
21
 
23
22
 
28
27
        # support.
29
28
        self.run_bzr('init a')
30
29
        out, err = self.run_bzr('branches a')
31
 
        self.assertEqual(out, "* (default)\n")
 
30
        self.assertEquals(out, "* (default)\n")
32
31
 
33
32
    def test_no_branch(self):
34
33
        # Listing the branches in a control directory without branches.
35
34
        self.run_bzr('init-repo a')
36
35
        out, err = self.run_bzr('branches a')
37
 
        self.assertEqual(out, "")
 
36
        self.assertEquals(out, "")
38
37
 
39
38
    def test_default_current_dir(self):
40
39
        # "bzr branches" list the branches in the current directory
41
40
        # if no location was specified.
42
41
        self.run_bzr('init-repo a')
43
42
        out, err = self.run_bzr('branches', working_dir='a')
44
 
        self.assertEqual(out, "")
 
43
        self.assertEquals(out, "")
45
44
 
46
45
    def test_recursive_current(self):
47
46
        self.run_bzr('init .')
48
 
        self.assertEqual(".\n", self.run_bzr('branches --recursive')[0])
 
47
        self.assertEquals(".\n", self.run_bzr('branches --recursive')[0])
49
48
 
50
49
    def test_recursive(self):
51
50
        self.run_bzr('init source')
65
64
        t.bzrdir.create_branch(name='another')
66
65
        t.bzrdir.create_branch(name='colocated')
67
66
        out, err = self.run_bzr('branches a')
68
 
        self.assertEqual(out, "* (default)\n"
 
67
        self.assertEquals(out, "* (default)\n"
69
68
                               "  another\n"
70
69
                               "  colocated\n")
71
70
 
75
74
        branch = t.bzrdir.create_branch(name='colocated')
76
75
        t.bzrdir.set_branch_reference(target_branch=branch)
77
76
        out, err = self.run_bzr('branches a')
78
 
        self.assertEqual(out, "  another\n"
 
77
        self.assertEquals(out, "  another\n"
79
78
                               "* colocated\n")
80
 
 
81
 
    def test_shared_repos(self):
82
 
        self.make_repository('a', shared=True)
83
 
        BzrDir.create_branch_convenience('a/branch1')
84
 
        b = BzrDir.create_branch_convenience('a/branch2')
85
 
        b.create_checkout(lightweight=True, to_location='b')
86
 
        out, err = self.run_bzr('branches b')
87
 
        self.assertEqual(out, "  branch1\n"
88
 
                               "* branch2\n")
89
 
 
90
 
    def test_standalone_branch(self):
91
 
        self.make_branch('a')
92
 
        out, err = self.run_bzr('branches a')
93
 
        self.assertEqual(out, "* (default)\n")