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

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-28 02:47:10 UTC
  • mfrom: (7519.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200728024710-a2ylds219f1lsl62
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/388173

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    option,
24
24
    osutils,
25
25
    tests,
 
26
    transform,
26
27
    )
27
 
from ..sixish import text_type
28
28
from . import (
29
29
    script,
30
30
    scenarios,
131
131
    scenarios = scenarios.multiply_scenarios(vary_by_conflicts())
132
132
 
133
133
    def test_stringification(self):
134
 
        text = text_type(self.conflict)
 
134
        text = str(self.conflict)
135
135
        self.assertContainsString(text, self.conflict.path)
136
136
        self.assertContainsString(text.lower(), "conflict")
137
137
        self.assertContainsString(repr(self.conflict),
142
142
        o = conflicts.Conflict.factory(**p.as_stanza().as_dict())
143
143
        self.assertEqual(o, p)
144
144
 
145
 
        self.assertIsInstance(o.path, text_type)
 
145
        self.assertIsInstance(o.path, str)
146
146
 
147
147
        if o.file_id is not None:
148
148
            self.assertIsInstance(o.file_id, bytes)
149
149
 
150
150
        conflict_path = getattr(o, 'conflict_path', None)
151
151
        if conflict_path is not None:
152
 
            self.assertIsInstance(conflict_path, text_type)
 
152
            self.assertIsInstance(conflict_path, str)
153
153
 
154
154
        conflict_file_id = getattr(o, 'conflict_file_id', None)
155
155
        if conflict_file_id is not None:
176
176
 
177
177
    def test_stringification(self):
178
178
        for text, o in zip(example_conflicts.to_strings(), example_conflicts):
179
 
            self.assertEqual(text, text_type(o))
 
179
            self.assertEqual(text, str(o))
180
180
 
181
181
 
182
182
# FIXME: The shell-like tests should be converted to real whitebox tests... or
1077
1077
        # This is nearly like TestResolveNonDirectoryParent but with branch and
1078
1078
        # trunk switched. As such it should certainly produce the same
1079
1079
        # conflict.
1080
 
        self.assertRaises(errors.MalformedTransform,
 
1080
        self.assertRaises(transform.MalformedTransform,
1081
1081
                          self.run_script, """
1082
1082
$ brz init trunk
1083
1083
...