def test_cmap2cpt(self): """Export colormap to cpt file.""" colors.cmap2cpt('viridis', filename=self.f) ref = os.path.join(self.ref_dir, 'viridis.cpt') with open(self.f) as testfile, open(ref) as reffile: assert testfile.readlines() == reffile.readlines()
def test_cmap2cpt(self): """Export colormap to cpt file.""" colors.cmap2cpt('viridis', filename=self.f) ref = os.path.join(self.ref_dir, 'viridis.cpt') assert filecmp.cmp(self.f, ref)