<s> """<STR_LIT>""" <EOL> import unittest <EOL> import os <EOL> try : <EOL> import matplotlib <EOL> matplotlib . use ( '<STR_LIT>' ) <EOL> except ImportError : <EOL> import nose <EOL> raise nose . SkipTest ( ) <EOL> from hyperopt import Trials <EOL> import hyperopt . plotting <EOL> from hyperopt import rand , fmin <EOL> from test_domains import many_dists <EOL> def get_do_show ( ) : <EOL> rval = int ( os . getenv ( '<STR_LIT>' , '<STR_LIT:0>' ) ) <EOL> print '<STR_LIT>' , rval <EOL> return rval <EOL> class TestPlotting ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> domain = self . domain = many_dists ( ) <EOL> trials = self . trials = Trials ( ) <EOL> fmin ( lambda x : x , <EOL> space = domain . expr , <EOL> trials = trials , <EOL> algo = rand . suggest , <EOL> max_evals = <NUM_LIT:200> ) <EOL> def test_plot_history ( self ) : <EOL> hyperopt . plotting . main_plot_history ( <EOL> self . trials , <EOL> do_show = get_do_show ( ) ) <EOL> def test_plot_histogram ( self ) : <EOL> hyperopt . plotting . main_plot_histogram ( <EOL> self . trials , <EOL> do_show = get_do_show ( ) ) <EOL> def test_plot_vars ( self ) : <EOL> hyperopt . plotting . main_plot_vars ( <EOL> self . trials , <EOL> self . domain , <EOL> do_show = get_do_show ( ) ) </s>
