def test_unicode():
    """ Dumping and loading a unicode string """
    filename, mode = 'test.h5', 'w'
    u = unichr(233) + unichr(0x0bf2) + unichr(3972) + unichr(6000)
    dump(u, filename, mode)
    u_hkl = load(filename)

    try:
        assert type(u) == type(u_hkl) == unicode
        assert u == u_hkl
        # For those interested, uncomment below to see what those codes are:
        # for i, c in enumerate(u_hkl):
        #     print i, '%04x' % ord(c), unicodedata.category(c),
        #     print unicodedata.name(c)
    except __HOLE__:
        os.remove(filename)
        raise
dataset/ETHPy150Open telegraphic/hickle/tests/test_hickle.py/test_unicode