Bug#950695: seaborn: FTBFS test failure in TestFacetGrid.test_set_ticklabels

Rebecca N. Palmer rebecca_palmer at zoho.com
Tue Feb 4 21:40:24 GMT 2020


Package: python3-seaborn
Version: 0.9.0-2
Severity: serious

Found during statsmodels transition testing, but also occurs without 
statsmodels.  I have not investigated further.

______________________ TestFacetGrid.test_set_ticklabels 
_______________________

self = <seaborn.tests.test_axisgrid.TestFacetGrid object at 0x7efc19d12880>

     def test_set_ticklabels(self):

         g = ag.FacetGrid(self.df, row="a", col="b")
         g.map(plt.plot, "x", "y")
         xlab = [l.get_text() + "h" for l in g.axes[1, 0].get_xticklabels()]
         ylab = [l.get_text() for l in g.axes[1, 0].get_yticklabels()]

         g.set_xticklabels(xlab)
         g.set_yticklabels(rotation=90)

         got_x = [l.get_text() for l in g.axes[1, 1].get_xticklabels()]
         got_y = [l.get_text() for l in g.axes[0, 0].get_yticklabels()]
         npt.assert_array_equal(got_x, xlab)
         npt.assert_array_equal(got_y, ylab)

         x, y = np.arange(10), np.arange(10)
         df = pd.DataFrame(np.c_[x, y], columns=["x", "y"])
         g = ag.FacetGrid(df).map(pointplot, "x", "y", order=x)
         g.set_xticklabels(step=2)
         got_x = [int(l.get_text()) for l in g.axes[0, 0].get_xticklabels()]
         npt.assert_array_equal(x[::2], got_x)

         g = ag.FacetGrid(self.df, col="d", col_wrap=5)
         g.map(plt.plot, "x", "y")
         g.set_xticklabels(rotation=45)
         g.set_yticklabels(rotation=75)
         for ax in g._bottom_axes:
             for l in ax.get_xticklabels():
 >               nt.assert_equal(l.get_rotation(), 45)

seaborn/tests/test_axisgrid.py:485:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _
/usr/lib/python3.8/unittest/case.py:912: in assertEqual
     assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _

self = <nose.tools.trivial.Dummy testMethod=nop>, first = 0.0, second = 45
msg = '0.0 != 45'

     def _baseAssertEqual(self, first, second, msg=None):
         """The default assertEqual implementation, not type specific."""
         if not first == second:
             standardMsg = '%s != %s' % _common_shorten_repr(first, second)
             msg = self._formatMessage(msg, standardMsg)
 >           raise self.failureException(msg)
E           AssertionError: 0.0 != 45

/usr/lib/python3.8/unittest/case.py:905: AssertionError



More information about the debian-science-maintainers mailing list