/usr/lib/python3/dist-packages/seaborn/tests/test_miscplot.py is in python3-seaborn 0.4.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import nose.tools as nt
import numpy.testing as npt
import matplotlib.pyplot as plt
from .. import miscplot as misc
from seaborn import color_palette
class TestPalPlot(object):
"""Test the function that visualizes a color palette."""
def test_palplot_size(self):
pal4 = color_palette("husl", 4)
misc.palplot(pal4)
size4 = plt.gcf().get_size_inches()
nt.assert_equal(tuple(size4), (4, 1))
pal5 = color_palette("husl", 5)
misc.palplot(pal5)
size5 = plt.gcf().get_size_inches()
nt.assert_equal(tuple(size5), (5, 1))
palbig = color_palette("husl", 3)
misc.palplot(palbig, 2)
sizebig = plt.gcf().get_size_inches()
nt.assert_equal(tuple(sizebig), (6, 2))
plt.close("all")
|