##// END OF EJS Templates
tests: use pyflakes as a tool, not a python module...
tests: use pyflakes as a tool, not a python module The usage of pyflakes as a Python module was introduced in e397c6d74652, to work around issue between Python 2 and Python 3. This issues are long behind us now and we can get beck to using pyflakes as a tool, giving us more flexibility about how we install it. The `hghave` requirements is modified to check that we have a tool available, instead of a python module.

File last commit:

r49801:642e31cb default
r52956:43602c67 default
Show More
mocktime.py
18 lines | 400 B | text/x-python | PythonLexer
Jun Wu
test-patchbomb: use mocktime...
r34317 import os
import time
Augie Fackler
formatting: blacken the codebase...
r43346
Gregory Szorc
py3: use class X: instead of class X(object):...
r49801 class mocktime:
Jun Wu
test-patchbomb: use mocktime...
r34317 def __init__(self, increment):
self.time = 0
self.increment = [float(s) for s in increment.split()]
self.pos = 0
def __call__(self):
self.time += self.increment[self.pos % len(self.increment)]
self.pos += 1
return self.time
Augie Fackler
formatting: blacken the codebase...
r43346
Jun Wu
test-patchbomb: use mocktime...
r34317 def uisetup(ui):
time.time = mocktime(os.environ.get('MOCKTIME', '0.1'))