def test_to_dict(self): """ Tests writing ColorMap colors to dictionary """ cmap = ColorMap.from_dict(self.cdict) cdict_out = cmap.to_dict() self.assertEqual(self.cdict, cdict_out)
def test_cmap_from_dict(self): """ Tests creation of a ColorMap from a dictionary """ cmap = ColorMap.from_dict(self.cdict) self.assertIsInstance(cmap, ColorMap)