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

def test_asBytesModeFromUnicodeWithUnusableEncoding(self):

    fp = filepath.FilePath(u'\u2603')
    with self.assertRaises(UnicodeError):
        fp.asBytesMode(encoding='ascii')
