~dpb/tarmac/ls-fixes

« back to all changes in this revision

Viewing changes to tarmac/tests/test_branch.py

  • Committer: Jonathan Lange
  • Date: 2012-12-19 15:56:13 UTC
  • mfrom: (394.7.8 u1-test-failures)
  • Revision ID: jml@canonical.com-20121219155613-pp9juqmiwlauid71
Fix the test failures in u1's tarmac fork

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        a_branch = branch.Branch.create(MockLPBranch(tree_dir), self.config)
39
39
        self.assertTrue(isinstance(a_branch, branch.Branch))
40
40
        self.assertTrue(a_branch.lp_branch.bzr_identity is not None)
41
 
        self.assertFalse(hasattr(a_branch, 'tree'))
42
41
        self.remove_branch_config(tree_dir)
43
42
 
44
43
    def test_create_missing_parent_dir(self):
66
65
        self.assertTrue(self.branch1.lp_branch.bzr_identity is not None)
67
66
        self.assertTrue(hasattr(self.branch1, 'tree'))
68
67
 
69
 
    def test_merge_raises_exception_with_no_tree(self):
70
 
        '''A merge on a branch with no tree will raise an exception.'''
71
 
        branch3_dir = os.path.join(self.TEST_ROOT, 'branch3')
72
 
        self.add_branch_config(branch3_dir)
73
 
        branch3 = branch.Branch.create(MockLPBranch(
74
 
                branch3_dir, source_branch=self.branch1.lp_branch),
75
 
                                       self.config)
76
 
 
77
 
        self.assertRaises(
78
 
            AttributeError, branch3.merge, self.branch2)
79
 
        self.remove_branch_config(branch3_dir)
80
 
        shutil.rmtree(branch3_dir)
81
 
 
82
68
    def test_merge_no_changes(self):
83
69
        '''A merge on a branch with a tree will raise an exception if no
84
70
        changes are present.'''