Skip to content

Commit

Permalink
TST: remove cleanup decorators that prevent plot tests from running
Browse files Browse the repository at this point in the history
  • Loading branch information
dancek committed Feb 21, 2015
1 parent e648c26 commit a743b6f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions bayespy/tests/test_plot.py
Expand Up @@ -30,15 +30,14 @@
"""

import numpy as np
from matplotlib.testing.decorators import image_comparison, cleanup
from matplotlib.testing.decorators import image_comparison

import bayespy.plot as bpplt
from bayespy.nodes import Bernoulli, Beta, Categorical, Dirichlet, \
Gamma, Gaussian, GaussianARD, Mixture, SumMultiply, Wishart
from bayespy.inference import VB
from bayespy.utils import random

@cleanup
@image_comparison(baseline_images=['gaussian_mixture'], extensions=['png'])
def test_gaussian_mixture_plot():
"""
Expand Down Expand Up @@ -83,33 +82,28 @@ def test_gaussian_mixture_plot():
bpplt.gaussian_mixture(Y, scale=2)


@cleanup
@image_comparison(baseline_images=['hinton_r'], extensions=['png'])
def test_hinton_plot_dirichlet():
(R,P,Z) = _setup_bernoulli_mixture()
bpplt.hinton(R)

@cleanup
@image_comparison(baseline_images=['hinton_p'], extensions=['png'])
def test_hinton_plot_beta():
(R,P,Z) = _setup_bernoulli_mixture()
bpplt.hinton(P)

@cleanup
@image_comparison(baseline_images=['hinton_z'], extensions=['png'])
def test_hinton_plot_categorical():
(R,P,Z) = _setup_bernoulli_mixture()
bpplt.hinton(Z)


@cleanup
@image_comparison(baseline_images=['pdf'], extensions=['png'])
def test_pdf_plot():
data = _setup_linear_regression()
bpplt.pdf(data['tau'], np.linspace(1e-6,1,100), color='k')
bpplt.pyplot.axvline(data['s']**(-2), color='r')

@cleanup
@image_comparison(baseline_images=['contour'], extensions=['png'])
def test_contour_plot():
data = _setup_linear_regression()
Expand Down

0 comments on commit a743b6f

Please sign in to comment.