~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-04 03:52:13 UTC
  • mfrom: (1551.19.15 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20071204035213-2kot5u403spjchen
Merge warns when criss-cross encountered + docs

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,
37
36
    probe_bad_non_ascii,
38
 
    split_suite_by_re,
39
37
    TestCaseWithTransport,
40
38
    TestNotApplicable,
41
39
    TestSkipped,
42
40
    )
43
 
from bzrlib.tests.EncodingAdapter import EncodingTestAdapter
44
41
from bzrlib.trace import mutter
45
42
 
46
43
 
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
 
 
56
44
class MsgEditorTest(TestCaseWithTransport):
57
45
 
58
46
    def make_uncommitted_tree(self):
257
245
        self.assertFileEqual(expected, msgfilename)
258
246
 
259
247
    def test__create_temp_file_with_commit_template_in_unicode_dir(self):
260
 
        from bzrlib.tests.test_diff import UnicodeFilename
261
 
        self.requireFeature(UnicodeFilename)
262
248
        if hasattr(self, 'info'):
263
249
            os.mkdir(self.info['directory'])
264
250
            os.chdir(self.info['directory'])