<s> '''<STR_LIT>''' <EOL> import unittest <EOL> from certfuzz . scoring . multiarmed_bandit . arms . bayes_laplace import BanditArmBayesLaplace <EOL> class Test ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . arm = BanditArmBayesLaplace ( ) <EOL> def tearDown ( self ) : <EOL> pass <EOL> def test_update_p ( self ) : <EOL> self . arm . update ( <NUM_LIT:1> , <NUM_LIT:1> ) <EOL> self . assertEqual ( <NUM_LIT> / <NUM_LIT> , self . arm . probability ) <EOL> self . arm . update ( <NUM_LIT:1> , <NUM_LIT:1> ) <EOL> self . assertEqual ( <NUM_LIT> / <NUM_LIT> , self . arm . probability ) <EOL> self . arm . successes = <NUM_LIT:0> <EOL> self . assertEqual ( <NUM_LIT:2> , self . arm . trials ) <EOL> self . arm . _update_p ( ) <EOL> self . assertEqual ( <NUM_LIT> , self . arm . probability ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
