/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/plugins/weave_fmt/test_workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from ... import (
23
23
    conflicts,
 
24
    )
 
25
from ...bzr.conflicts import TextConflict, ContentsConflict
 
26
from ... import (
24
27
    errors,
25
28
    )
26
29
 
45
48
                          None)
46
49
        with open('lala.BASE', 'wb') as f:
47
50
            f.write(b'labase')
48
 
        expected = conflicts.ContentsConflict('lala')
 
51
        expected = ContentsConflict('lala')
49
52
        self.assertEqual(list(tree.conflicts()), [expected])
50
53
        with open('lala', 'wb') as f:
51
54
            f.write(b'la')
52
55
        tree.add('lala', b'lala-id')
53
 
        expected = conflicts.ContentsConflict('lala', file_id='lala-id')
 
56
        expected = ContentsConflict('lala', file_id='lala-id')
54
57
        self.assertEqual(list(tree.conflicts()), [expected])
55
58
        with open('lala.THIS', 'wb') as f:
56
59
            f.write(b'lathis')
57
60
        with open('lala.OTHER', 'wb') as f:
58
61
            f.write(b'laother')
59
62
        # When "text conflict"s happen, stem, THIS and OTHER are text
60
 
        expected = conflicts.TextConflict('lala', file_id='lala-id')
 
63
        expected = TextConflict('lala', file_id='lala-id')
61
64
        self.assertEqual(list(tree.conflicts()), [expected])
62
65
        os.unlink('lala.OTHER')
63
66
        os.mkdir('lala.OTHER')
64
 
        expected = conflicts.ContentsConflict('lala', file_id='lala-id')
 
67
        expected = ContentsConflict('lala', file_id='lala-id')
65
68
        self.assertEqual(list(tree.conflicts()), [expected])
66
69
 
67
70
    def test_detect_conflicts(self):