def test_map_err(): o = Ok('yay') n = Err('nay') assert o.map_err(lambda x: x + x).ok() == 'yay' assert n.map_err(lambda x: x + x).err() == 'naynay'