Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 def test_cmap_from_dict(self):
     """
     Tests creation of a ColorMap from a dictionary
     """
     cmap = ColorMap.from_dict(self.cdict)
     self.assertIsInstance(cmap, ColorMap)