Exemple #1
0
    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()
Exemple #2
0
    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)