~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.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:
19
19
import os
20
20
import sys
21
21
 
22
 
from bzrlib.tests import TestCase, _load_module_by_name
 
22
from bzrlib.tests import TestCase, TestCaseInTempDir, _load_module_by_name
23
23
 
24
24
 
25
25
class SelftestTests(TestCase):
35
35
 
36
36
 
37
37
class MetaTestLog(TestCase):
 
38
 
38
39
    def test_logging(self):
39
40
        """Test logs are captured when a test fails."""
40
41
        self.log('a test message')
41
42
        self._log_file.flush()
42
43
        self.assertContainsRe(self._get_log(), 'a test message\n')
 
44
 
 
45
 
 
46
class TestTreeShape(TestCaseInTempDir):
 
47
 
 
48
    def test_unicode_paths(self):
 
49
        filename = u'hell\u00d8'
 
50
        self.build_tree_contents([(filename, 'contents of hello')])
 
51
        self.failUnlessExists(filename)