def test_numpy_str_someunicode_to_uint16_back(): for i in range(100): data = np.unicode_(str_unicode) intermed = utils.convert_numpy_str_to_uint16(data) out = utils.convert_to_numpy_str(intermed)[0] assert_equal_nose(out.tostring(), data.tostring()) assert_equal(out, data)
def test_numpy_str_someunicode_to_uint16_back(): for i in range(100): data = np.unicode_(str_unicode) intermed = utils.convert_numpy_str_to_uint16(data) out = utils.convert_to_numpy_str(intermed)[0] assert out.tostring() == data.tostring() assert_equal(out, data)
def test_numpy_str_ascii_to_uint16_back(): for i in range(100): data = np.unicode_(str_ascii) intermed = utils.convert_numpy_str_to_uint16(data) out = utils.convert_to_numpy_str(intermed)[0] assert_equal_nose(out.tostring(), data.tostring()) assert_equal(out, data)