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

  • Committer: Jelmer Vernooij
  • Date: 2020-04-05 19:11:34 UTC
  • mto: (7490.7.16 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200405191134-0aebh8ikiwygxma5
Populate the .gitignore file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2009, 2010, 2011 Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
#
4
4
# This program is free software; you can redistribute it and/or modify
17
17
 
18
18
"""Adapter for running test cases against multiple encodings."""
19
19
 
20
 
from copy import deepcopy
21
 
 
22
 
from bzrlib.tests import TestSuite
23
 
 
24
 
 
25
20
# prefix for micro (1/1000000)
26
21
_mu = u'\xb5'
27
22
 
80
75
 
81
76
 
82
77
encoding_scenarios = [
83
 
        # Permutation 1 of utf-8
84
 
        ('utf-8,1', {
85
 
            'info': {
86
 
                'committer': _erik,
87
 
                'message': _yellow_horse,
88
 
                'filename': _shrimp_sandwich,
89
 
                'directory': _nihonjin,
90
 
                },
91
 
            'encoding': 'utf-8',
92
 
            }),
93
 
        # Permutation 2 of utf-8
94
 
        ('utf-8,2', {
95
 
            'info': {
96
 
                'committer': _alexander,
97
 
                'message': u'Testing ' + _mu,
98
 
                'filename': _shalom,
99
 
                'directory': _juju,
100
 
                },
101
 
            'encoding': 'utf-8',
102
 
            }),
103
 
        ('iso-8859-1', {
104
 
            'info': {
105
 
                'committer': _erik,
106
 
                'message': u'Testing ' + _mu,
107
 
                'filename': _juju_alt,
108
 
                'directory': _shrimp_sandwich,
109
 
                },
110
 
            'encoding': 'iso-8859-1',
111
 
            }),
112
 
        ('iso-8859-2', {
113
 
            'info': {
114
 
                'committer': _someone,
115
 
                'message': _yellow_horse,
116
 
                'filename': _yellow,
117
 
                'directory': _something,
118
 
                },
119
 
            'encoding': 'iso-8859-2',
120
 
            }),
121
 
        ('cp1251', {
122
 
            'info': {
123
 
                'committer': _alexander,
124
 
                'message': u'Testing ' + _mu,
125
 
                'filename': _russian_test,
126
 
                'directory': _russian_test + 'dir',
127
 
                },
128
 
            'encoding': 'cp1251',
129
 
            }),
130
 
# The iso-8859-1 tests run on a default windows cp437 installation
131
 
# and it takes a long time to run an extra permutation of the tests
132
 
# But just in case we want to add this back in:
133
 
#        ('cp437', {'committer':_erik
134
 
#                  , 'message':u'Testing ' + _mu
135
 
#                  , 'filename':'file_' + _omega
136
 
#                  , 'directory':_epsilon + '_dir',
137
 
#            'encoding': 'cp437'}),
 
78
    # Permutation 1 of utf-8
 
79
    ('utf-8,1', {
 
80
        'info': {
 
81
            'committer': _erik,
 
82
            'message': _yellow_horse,
 
83
            'filename': _shrimp_sandwich,
 
84
            'directory': _nihonjin,
 
85
            },
 
86
        'encoding': 'utf-8',
 
87
        }),
 
88
    # Permutation 2 of utf-8
 
89
    ('utf-8,2', {
 
90
        'info': {
 
91
            'committer': _alexander,
 
92
            'message': u'Testing ' + _mu,
 
93
            'filename': _shalom,
 
94
            'directory': _juju,
 
95
            },
 
96
        'encoding': 'utf-8',
 
97
        }),
 
98
    ('iso-8859-1', {
 
99
        'info': {
 
100
            'committer': _erik,
 
101
            'message': u'Testing ' + _mu,
 
102
            'filename': _juju_alt,
 
103
            'directory': _shrimp_sandwich,
 
104
            },
 
105
        'encoding': 'iso-8859-1',
 
106
        }),
 
107
    ('iso-8859-2', {
 
108
        'info': {
 
109
            'committer': _someone,
 
110
            'message': _yellow_horse,
 
111
            'filename': _yellow,
 
112
            'directory': _something,
 
113
            },
 
114
        'encoding': 'iso-8859-2',
 
115
        }),
 
116
    ('cp1251', {
 
117
        'info': {
 
118
            'committer': _alexander,
 
119
            'message': u'Testing ' + _mu,
 
120
            'filename': _russian_test,
 
121
            'directory': _russian_test + 'dir',
 
122
            },
 
123
        'encoding': 'cp1251',
 
124
        }),
 
125
    # The iso-8859-1 tests run on a default windows cp437 installation
 
126
    # and it takes a long time to run an extra permutation of the tests
 
127
    # But just in case we want to add this back in:
 
128
    #        ('cp437', {'committer':_erik
 
129
    #                  , 'message':u'Testing ' + _mu
 
130
    #                  , 'filename':'file_' + _omega
 
131
    #                  , 'directory':_epsilon + '_dir',
 
132
    #            'encoding': 'cp437'}),
138
133
    ]