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

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:06:46 UTC
  • mfrom: (6673 work)
  • mto: This revision was merged to the branch mainline in revision 6675.
  • Revision ID: jelmer@jelmer.uk-20170610000646-xj6jh277lo4xuo10
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import os
23
23
import shutil
24
24
 
25
 
from ..bzrdir import BzrDir
 
25
from .controldir import ControlDir
26
26
from .. import bisect
27
27
from . import (
28
28
    TestCaseWithTransport,
40
40
                        1.3: "one dot three", 2: "two", 3: "three",
41
41
                        4: "four", 5: "five"}
42
42
 
43
 
        test_file = open("test_file")
44
 
        content = test_file.read().strip()
 
43
        with open("test_file") as f:
 
44
            content = f.read().strip()
45
45
        if content != rev_contents[rev]:
46
 
            rev_ids = dict((rev_contents[k], k) for k in rev_contents.keys())
 
46
            rev_ids = dict((rev_contents[k], k) for k in rev_contents)
47
47
            found_rev = rev_ids[content]
48
48
            raise AssertionError("expected rev %0.1f, found rev %0.1f"
49
49
                                 % (rev, found_rev))
71
71
                                                     'test_file_append')))
72
72
        self.tree.commit(message = "add test files")
73
73
 
74
 
        BzrDir.open(".").sprout("../temp-clone")
75
 
        clone_bzrdir = BzrDir.open("../temp-clone")
 
74
        ControlDir.open(".").sprout("../temp-clone")
 
75
        clone_bzrdir = ControlDir.open("../temp-clone")
76
76
        clone_tree = clone_bzrdir.open_workingtree()
77
77
        for content in ["one dot one", "one dot two", "one dot three"]:
78
78
            test_file = open("../temp-clone/test_file", "w")