~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Robert Collins
  • Date: 2007-12-18 07:36:44 UTC
  • mto: (3128.1.1 param_tests)
  • mto: This revision was merged to the branch mainline in revision 3129.
  • Revision ID: robertc@robertcollins.net-20071218073644-1npofqduijg8tkie
Push the message editor test parameterisation down into the message editor
tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    edit_commit_message_encoded
34
34
)
35
35
from bzrlib.tests import (
 
36
    iter_suite_tests,
36
37
    probe_bad_non_ascii,
 
38
    split_suite_by_re,
37
39
    TestCaseWithTransport,
38
40
    TestNotApplicable,
39
41
    TestSkipped,
40
42
    )
 
43
from bzrlib.tests.EncodingAdapter import EncodingTestAdapter
41
44
from bzrlib.trace import mutter
42
45
 
43
46
 
 
47
def load_tests(standard_tests, module, loader):
 
48
    """Parameterise the test for tempfile creation with different encodings."""
 
49
    to_adapt, result = split_suite_by_re(standard_tests,
 
50
        "test__create_temp_file_with_commit_template_in_unicode_dir")
 
51
    for test in iter_suite_tests(to_adapt):
 
52
        result.addTests(EncodingTestAdapter().adapt(test))
 
53
    return result
 
54
 
 
55
 
44
56
class MsgEditorTest(TestCaseWithTransport):
45
57
 
46
58
    def make_uncommitted_tree(self):