You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related code:
def test_create_then_load_categorical(self):
bio = BytesIO()
contents = [1, 2, 1, 2]
with session.Session() as s:
with h5py.File(bio, 'w') as src:
df = src.create_group('df') f = s.create_categorical(df, 'foo', 'int8', {b'a': 1, b'b': 2})
f.data.write(np.array(contents))
with session.Session() as s:
with h5py.File(bio, 'r') as src:
f = s.get(src['df']['foo'])
self.assertListEqual(contents, f.data[:].tolist())
**self.assertDictEqual({1: b'a', 2: b'b'}, f.keys)**
Seems python zip function put the byte array into string, so b'a' is not equals to 'a' hence unittest report error. This is ok when running python 3.7.5
No description provided.
The text was updated successfully, but these errors were encountered: