

def _test_small_strings_no_warn(self, compress):
    empty = np.array([], dtype='uint8')
    with tm.assert_produces_warning(None):
        empty_unpacked = self.encode_decode(empty, compress=compress)
    np.testing.assert_array_equal(empty_unpacked, empty)
    self.assertTrue(empty_unpacked.flags.writeable)
    char = np.array([ord(b'a')], dtype='uint8')
    with tm.assert_produces_warning(None):
        char_unpacked = self.encode_decode(char, compress=compress)
    np.testing.assert_array_equal(char_unpacked, char)
    self.assertTrue(empty.flags.writeable)
    char_unpacked[0] = ord(b'b')
    self.assertEqual(ord(b'a'), ord('a'))
    np.testing.assert_array_equal(char_unpacked, np.array([ord(b'b')], dtype='uint8'))

dataset/ETHPy150Open pydata/pandas/pandas/io/tests/test_packers.py TestCompression._test_small_strings_no_warn/VarMisuse@129/176 `char_unpacked`->`empty`