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

  • Committer: Marius Kruger
  • Date: 2010-07-10 21:28:56 UTC
  • mto: (5384.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5385.
  • Revision ID: marius.kruger@enerweb.co.za-20100710212856-uq4ji3go0u5se7hx
* Update documentation
* add NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2009, 2010, 2011 Canonical Ltd
 
1
# Copyright (C) 2006 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
 
20
25
# prefix for micro (1/1000000)
21
26
_mu = u'\xb5'
22
27
 
75
80
 
76
81
 
77
82
encoding_scenarios = [
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'}),
 
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'}),
133
138
    ]