File: __init__.py

package info (click to toggle)
python-ratelimit 2.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 152 kB
  • sloc: python: 205; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import unittest

class Clock(object):
    def __init__(self):
        self.reset()

    def __call__(self):
        return self.now

    def reset(self):
        self.now = 0

    def increment(self, num=1):
        self.now += num

clock = Clock()

__all__ = [
    'unittest',
    'clock'
]