File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
from math import floor
2
+
2
3
import time
3
4
import sys
4
5
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ def readme():
6
6
return file .read ()
7
7
8
8
setup (name = 'ratelimit' ,
9
- version = Version ('1.2 .0' ).number ,
9
+ version = Version ('1.3 .0' ).number ,
10
10
description = 'API rate limit decorator' ,
11
11
long_description = readme ().strip (),
12
12
author = 'Tomas Basham' ,
Original file line number Diff line number Diff line change 1
- import time
2
1
from ratelimit import rate_limited
3
2
from tests import *
4
3
4
+ import time
5
+
5
6
class TestDecorator (unittest .TestCase ):
6
7
7
8
@rate_limited (1 , 2 )
@@ -26,4 +27,4 @@ def test_timing(self):
26
27
self .increment ()
27
28
after = time .time ()
28
29
# allow a 0.1 second error
29
- self .assertTrue ((after - before - 2.0 ) < 0.1 , " Function was executed too fast" )
30
+ self .assertTrue ((after - before - 2.0 ) < 0.1 , ' Function was executed too fast' )
You can’t perform that action at this time.
0 commit comments