~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: John Arbash Meinel
  • Date: 2008-03-17 20:11:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3532.
  • Revision ID: john@arbash-meinel.com-20080317201130-254scn9jqanfvc92
Raise a clear error about the offending filename when there is a filename with bad characters.
Related to bug #77657

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
                              'a test message\n')
99
99
 
100
100
 
 
101
class TestUnicodeFilename(TestCase):
 
102
 
 
103
    def test_probe_passes(self):
 
104
        """UnicodeFilename._probe passes."""
 
105
        # We can't test much more than that because the behaviour depends
 
106
        # on the platform.
 
107
        tests.UnicodeFilename._probe()
 
108
 
 
109
 
101
110
class TestTreeShape(TestCaseInTempDir):
102
111
 
103
112
    def test_unicode_paths(self):
 
113
        self.requireFeature(tests.UnicodeFilename)
 
114
 
104
115
        filename = u'hell\u00d8'
105
 
        try:
106
 
            self.build_tree_contents([(filename, 'contents of hello')])
107
 
        except UnicodeEncodeError:
108
 
            raise TestSkipped("can't build unicode working tree in "
109
 
                "filesystem encoding %s" % sys.getfilesystemencoding())
 
116
        self.build_tree_contents([(filename, 'contents of hello')])
110
117
        self.failUnlessExists(filename)
111
118
 
112
119