/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 breezy/tests/blackbox/test_bisect.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
 
19
18
"""Tests of the 'brz bisect' command."""
20
19
 
21
20
from __future__ import absolute_import
72
71
        test_file_append.close()
73
72
        self.tree.add(self.tree.relpath(os.path.join(os.getcwd(),
74
73
                                                     'test_file_append')))
75
 
        self.tree.commit(message = "add test files")
 
74
        self.tree.commit(message="add test files")
76
75
 
77
76
        BzrDir.open(".").sprout("../temp-clone")
78
77
        clone_bzrdir = BzrDir.open("../temp-clone")
84
83
            test_file_append = open("../temp-clone/test_file_append", "a")
85
84
            test_file_append.write(content + "\n")
86
85
            test_file_append.close()
87
 
            clone_tree.commit(message = "make branch test change")
 
86
            clone_tree.commit(message="make branch test change")
88
87
            saved_subtree_revid = clone_tree.branch.last_revision()
89
88
 
90
89
        self.tree.merge_from_branch(clone_tree.branch)
94
93
        test_file_append = open("test_file_append", "a")
95
94
        test_file_append.write("two\n")
96
95
        test_file_append.close()
97
 
        self.tree.commit(message = "merge external branch")
 
96
        self.tree.commit(message="merge external branch")
98
97
        shutil.rmtree("../temp-clone")
99
98
 
100
99
        self.subtree_rev = saved_subtree_revid
107
106
            test_file_append = open("test_file_append", "a")
108
107
            test_file_append.write(content + "\n")
109
108
            test_file_append.close()
110
 
            self.tree.commit(message = "make test change")
 
109
            self.tree.commit(message="make test change")
111
110
 
112
111
    def testWorkflow(self):
113
112
        """Run through a basic usage scenario."""
277
276
        try:
278
277
            self.assertRevno(2)
279
278
        except AssertionError:
280
 
            raise KnownFailure\
281
 
                ("bisect does not drill down into merge commits: "
282
 
                 "https://bugs.launchpad.net/bzr-bisect/+bug/539937")
 
279
            raise KnownFailure("bisect does not drill down into merge commits: "
 
280
                               "https://bugs.launchpad.net/bzr-bisect/+bug/539937")
283
281
 
284
282
    def testRunScriptSubtree(self):
285
283
        """Make a test script and run it."""
297
295
        try:
298
296
            self.assertRevno(1.2)
299
297
        except AssertionError:
300
 
            raise KnownFailure\
301
 
                ("bisect does not drill down into merge commits: "
302
 
                 "https://bugs.launchpad.net/bzr-bisect/+bug/539937")
 
298
            raise KnownFailure("bisect does not drill down into merge commits: "
 
299
                               "https://bugs.launchpad.net/bzr-bisect/+bug/539937")