<s> """<STR_LIT>""" <EOL> from statsite . metrics import Counter <EOL> class TestCounterMetric ( object ) : <EOL> def test_fold ( self ) : <EOL> """<STR_LIT>""" <EOL> metrics = [ Counter ( "<STR_LIT:k>" , <NUM_LIT:10> ) , <EOL> Counter ( "<STR_LIT:k>" , <NUM_LIT:15> ) , <EOL> Counter ( "<STR_LIT>" , <NUM_LIT:5> ) , <EOL> Counter ( "<STR_LIT>" , <NUM_LIT:15> ) ] <EOL> expected = [ ( "<STR_LIT>" , <NUM_LIT> , <NUM_LIT:0> ) , ( "<STR_LIT>" , <NUM_LIT:20> , <NUM_LIT:0> ) ] <EOL> result = Counter . fold ( metrics , <NUM_LIT:0> ) <EOL> assert expected == result </s>
