Last active
March 5, 2018 14:41
-
-
Save abhijeetpanda12/3017daed56e47a18b300ab18c89e756e to your computer and use it in GitHub Desktop.
tukey plot_simultaneous() smoke test for statsmodels/stats/tests/test_pairwise.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try: | |
import matplotlib.pyplot as plt # makes plt available for test functions | |
have_matplotlib = True | |
except ImportError: | |
have_matplotlib = False | |
class CheckTuckeyHSDMixin(object): | |
@classmethod | |
def setup_class_(cls): | |
cls.mc = MultiComparison(cls.endog, cls.groups) | |
cls.res = cls.mc.tukeyhsd(alpha=cls.alpha) | |
@skipif(not have_matplotlib, reason='matplotlib not available') | |
def test_plot_simultaneous(self): | |
result = pairwise_tukeyhsd(self.endog, self.groups, alpha=self.alpha) | |
# Smoke test for figure | |
fig = result.plot_simultaneous() | |
assert_equal(isinstance(fig, plt.Figure), True) | |
plt.close(fig) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment