Did I find the right examples for you? yes no

All Samples(7)  |  Call(6)  |  Derive(0)  |  Import(1)

src/p/y/pystat-0.2.4/pystat/tests/test_counter.py   pystat(Download)
 
from pystat.tests.base import TestCase
from pystat.counter import Counter
 
 
class TestCounter(TestCase):
 
    def setUp(self):
        super(TestCounter, self).setUp()
        self.counter = Counter()
    def test_union(self):
        c1 = Counter()
        c2 = Counter()
        c1.add(2)
        c1.add(5)
    def test_init(self):
        c = Counter([1, 2, 3])
        self.assertEqual(3, len(c))
        self.assertEqual(6, int(c))
        self.assertEqual(1, c.min)