<s> """<STR_LIT>""" <EOL> import encoder <EOL> import optimizer <EOL> import unittest <EOL> import test_tools <EOL> import mjpeg <EOL> class TestMotionJpegCodec ( test_tools . FileUsingCodecTest ) : <EOL> def test_OneBlackFrame ( self ) : <EOL> codec = mjpeg . MotionJpegCodec ( ) <EOL> my_optimizer = optimizer . Optimizer ( codec ) <EOL> videofile = test_tools . MakeYuvFileWithOneBlankFrame ( <EOL> '<STR_LIT>' ) <EOL> encoding = my_optimizer . BestEncoding ( <NUM_LIT> , videofile ) <EOL> encoding . Execute ( ) <EOL> self . assertLess ( <NUM_LIT> , my_optimizer . Score ( encoding ) ) <EOL> def test_ParametersSet ( self ) : <EOL> codec = mjpeg . MotionJpegCodec ( ) <EOL> my_optimizer = optimizer . Optimizer ( codec ) <EOL> videofile = test_tools . MakeYuvFileWithOneBlankFrame ( <EOL> '<STR_LIT>' ) <EOL> my_encoder = encoder . Encoder ( my_optimizer . context , <EOL> encoder . OptionValueSet ( codec . option_set , '<STR_LIT>' , <EOL> formatter = codec . option_formatter ) ) <EOL> encoding = my_encoder . Encoding ( <NUM_LIT> , videofile ) <EOL> encoding . Execute ( ) <EOL> self . assertLess ( <NUM_LIT> , my_optimizer . Score ( encoding ) ) <EOL> def test_ParametersAdjusted ( self ) : <EOL> codec = mjpeg . MotionJpegCodec ( ) <EOL> my_optimizer = optimizer . Optimizer ( codec ) <EOL> my_encoder = encoder . Encoder ( my_optimizer . context , <EOL> encoder . OptionValueSet ( codec . option_set , '<STR_LIT>' , <EOL> formatter = codec . option_formatter ) ) <EOL> self . assertEquals ( '<STR_LIT:2>' , my_encoder . parameters . GetValue ( '<STR_LIT>' ) ) <EOL> self . assertEquals ( '<STR_LIT:2>' , my_encoder . parameters . GetValue ( '<STR_LIT>' ) ) <EOL> my_encoder = encoder . Encoder ( my_optimizer . context , <EOL> encoder . OptionValueSet ( codec . option_set , '<STR_LIT>' , <EOL> formatter = codec . option_formatter ) ) <EOL> self . assertEquals ( '<STR_LIT:3>' , my_encoder . parameters . GetValue ( '<STR_LIT>' ) ) <EOL> self . assertEquals ( '<STR_LIT:3>' , my_encoder . parameters . GetValue ( '<STR_LIT>' ) ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
