'C{asTextMode} with an C{encoding} argument that can\'t be used to encode
the unicode path raises a L{UnicodeError}.'

def test_asTextModeFromBytesWithUnusableEncoding(self):

    fp = filepath.FilePath('\\u2603')
    with self.assertRaises(UnicodeError):
        fp.asTextMode(encoding='utf-32')
