def test_image_state_update(): """Test that an image can be updated from the output of its _get_state method() """ image = Image(np.ones((32, 32, 32))) state = image._get_state() for k, v in state.items(): setattr(image, k, v)