<s> """<STR_LIT>""" <EOL> from braubuddy . tests import BraubuddyTestCase <EOL> from braubuddy . output import listmemory <EOL> class TestListMemory ( BraubuddyTestCase ) : <EOL> def test_published_datapoint_returned ( self ) : <EOL> """<STR_LIT>""" <EOL> output = listmemory . ListMemoryOutput ( ) <EOL> target = <NUM_LIT:20> <EOL> temp = <NUM_LIT> <EOL> heat = <NUM_LIT:100> <EOL> cool = <NUM_LIT:0> <EOL> output . publish_status ( target , temp , heat , cool ) <EOL> result = output . get_datapoints ( ) [ <NUM_LIT:0> ] <EOL> self . assertEqual ( result [ <NUM_LIT:0> : <NUM_LIT:4> ] , [ target , temp , heat , cool ] ) <EOL> def test_published_datapoints_returned ( self ) : <EOL> """<STR_LIT>""" <EOL> output = listmemory . ListMemoryOutput ( ) <EOL> for i in range ( <NUM_LIT:100> ) : <EOL> output . publish_status ( <NUM_LIT:20> , <NUM_LIT> , <NUM_LIT:100> , <NUM_LIT:0> ) <EOL> result = output . get_datapoints ( ) <EOL> self . assertEqual ( len ( result ) , <NUM_LIT:100> ) <EOL> def test_limited_datapoints_returned ( self ) : <EOL> """<STR_LIT>""" <EOL> output = listmemory . ListMemoryOutput ( ) <EOL> for i in range ( <NUM_LIT:100> ) : <EOL> output . publish_status ( <NUM_LIT:20> , <NUM_LIT> , <NUM_LIT:100> , <NUM_LIT:0> ) <EOL> result = output . get_datapoints ( limit = <NUM_LIT:10> ) <EOL> self . assertEqual ( len ( result ) , <NUM_LIT:10> ) </s>
