/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: Jelmer Vernooij
  • Date: 2020-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    tests,
26
26
    transform,
27
27
    )
 
28
from ..sixish import text_type
28
29
from . import (
29
30
    script,
30
31
    scenarios,
131
132
    scenarios = scenarios.multiply_scenarios(vary_by_conflicts())
132
133
 
133
134
    def test_stringification(self):
134
 
        text = str(self.conflict)
 
135
        text = text_type(self.conflict)
135
136
        self.assertContainsString(text, self.conflict.path)
136
137
        self.assertContainsString(text.lower(), "conflict")
137
138
        self.assertContainsString(repr(self.conflict),
142
143
        o = conflicts.Conflict.factory(**p.as_stanza().as_dict())
143
144
        self.assertEqual(o, p)
144
145
 
145
 
        self.assertIsInstance(o.path, str)
 
146
        self.assertIsInstance(o.path, text_type)
146
147
 
147
148
        if o.file_id is not None:
148
149
            self.assertIsInstance(o.file_id, bytes)
149
150
 
150
151
        conflict_path = getattr(o, 'conflict_path', None)
151
152
        if conflict_path is not None:
152
 
            self.assertIsInstance(conflict_path, str)
 
153
            self.assertIsInstance(conflict_path, text_type)
153
154
 
154
155
        conflict_file_id = getattr(o, 'conflict_file_id', None)
155
156
        if conflict_file_id is not None:
176
177
 
177
178
    def test_stringification(self):
178
179
        for text, o in zip(example_conflicts.to_strings(), example_conflicts):
179
 
            self.assertEqual(text, str(o))
 
180
            self.assertEqual(text, text_type(o))
180
181
 
181
182
 
182
183
# FIXME: The shell-like tests should be converted to real whitebox tests... or