/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-02-14 03:16:54 UTC
  • mfrom: (7479.2.3 no-more-python2)
  • Revision ID: breezy.the.bot@gmail.com-20200214031654-bp1xtv2jr9nmhto3
Drop python2 support.

Merged from https://code.launchpad.net/~jelmer/brz/no-more-python2/+merge/378694

Show diffs side-by-side

added added

removed removed

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