~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

Run the test suite with no locale as well as the default locale. Also add a test for build_tree_shape to selftest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.msgeditor import make_commit_message_template
24
24
from bzrlib.tests import TestCaseInTempDir
25
25
 
26
 
from bzrlib.tests.treeshape import build_tree_contents
27
 
 
28
 
 
29
 
def make_uncommitted_tree():
30
 
    """Build a branch with uncommitted changes in the cwd."""
31
 
    b = Branch.initialize('.')
32
 
    working_tree = b.working_tree()
33
 
    filename = u'hell\u00d8'
34
 
    build_tree_contents([(filename, 'contents of hello')])
35
 
    working_tree.add(filename)
36
 
    return working_tree
37
 
 
38
26
 
39
27
class MsgEditorTest(TestCaseInTempDir):
40
28
 
 
29
    def make_uncommitted_tree():
 
30
        """Build a branch with uncommitted unicode named changes in the cwd."""
 
31
        b = Branch.initialize('.')
 
32
        working_tree = b.working_tree()
 
33
        filename = u'hell\u00d8'
 
34
        self.build_tree_contents([(filename, 'contents of hello')])
 
35
        working_tree.add(filename)
 
36
        return working_tree
 
37
    
41
38
    def test_commit_template(self):
42
39
        """Test building a commit message template"""
43
40
        working_tree = make_uncommitted_tree()