~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-19 09:10:53 UTC
  • mfrom: (3128.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20071219091053-81xgp971m1pgmccf
(robertc) Allow arbitrary parameteriZation of tests cleanly.

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
    """Parameterize 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):