~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/tests/test_corners.py

[rs=thumper] merge loggerhead trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
        The commit adds a file called 'myfilename' containing the string
13
13
        'foo'.
14
14
        """
15
 
        f = open(os.path.join(self.bzrbranch, filename), 'w')
16
 
        try:
17
 
            f.write("foo")
18
 
        finally:
19
 
            f.close()
 
15
        self.build_tree_contents([(filename, 'foo')])
20
16
        self.tree.add(filename)
21
17
        self.tree.commit(message=commit_msg)
22
18
 
30
26
        self.addFileAndCommit('myfilename', msg)
31
27
 
32
28
        # Make a commit that changes the execute bit of 'myfilename'.
33
 
        os.chmod(os.path.join(self.bzrbranch, 'myfilename'), 0755)
 
29
        os.chmod('myfilename', 0755)
34
30
        newrevid = self.tree.commit(message='make something executable')
35
31
 
36
32
        # Check that it didn't break things.