<s> """<STR_LIT>""" <EOL> import sys <EOL> import os <EOL> import common <EOL> from pyalgotrade . barfeed import yahoofeed <EOL> from pyalgotrade import plotter <EOL> sys . path . append ( "<STR_LIT>" ) <EOL> import sma_crossover <EOL> class PlotterTestCase ( common . TestCase ) : <EOL> def testDownloadAndParseDaily ( self ) : <EOL> instrument = "<STR_LIT>" <EOL> barFeed = yahoofeed . Feed ( ) <EOL> barFeed . addBarsFromCSV ( instrument , common . get_data_file_path ( "<STR_LIT>" ) ) <EOL> strat = sma_crossover . SMACrossOver ( barFeed , instrument , <NUM_LIT:20> ) <EOL> plt = plotter . StrategyPlotter ( strat , True , True , True ) <EOL> plt . getInstrumentSubplot ( instrument ) . addDataSeries ( "<STR_LIT>" , strat . getSMA ( ) ) <EOL> strat . run ( ) <EOL> with common . TmpDir ( ) as tmpPath : <EOL> fig = plt . buildFigure ( ) <EOL> fig . set_size_inches ( <NUM_LIT:10> , <NUM_LIT:8> ) <EOL> png = os . path . join ( tmpPath , "<STR_LIT>" ) <EOL> fig . savefig ( png ) <EOL> self . assertGreater ( <EOL> os . stat ( png ) . st_size , <EOL> <NUM_LIT> <EOL> ) </s>
