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

  • Committer: Jelmer Vernooij
  • Date: 2018-07-15 18:45:17 UTC
  • mto: (7045.3.3 python3-r)
  • mto: This revision was merged to the branch mainline in revision 7047.
  • Revision ID: jelmer@jelmer.uk-20180715184517-1ipa50jg36zvglc5
Fix another 300 tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    )
27
27
from ..sixish import (
28
28
    BytesIO,
 
29
    PY3,
29
30
    )
30
31
from .scenarios import load_tests_apply_scenarios
31
32
 
60
61
        self.assertIsNot(m, None)
61
62
        self.assertPathExists(m.group(1))
62
63
 
 
64
 
63
65
class TestPlatformUse(tests.TestCase):
64
66
 
65
67
    scenarios = [('ascii', dict(_platform='test-platform')),
74
76
        self.overrideAttr(platform, 'platform', lambda **kwargs: self._platform)
75
77
        version.show_version(show_config=False, show_copyright=False,
76
78
                             to_file=out)
77
 
        self.assertContainsRe(out.getvalue(),
78
 
                              r'(?m)^  Platform: %s' % self._platform)
 
79
        expected = r'(?m)^  Platform: %s' % self._platform
 
80
        if PY3:
 
81
            expected = expected.encode('utf-8')
 
82
        self.assertContainsRe(out.getvalue(), expected)