##// END OF EJS Templates
tests: finally fix up test-fuzz-targets.t...
tests: finally fix up test-fuzz-targets.t It's been failing on my workstation for a while, since I have a new enough LLVM that I had the fuzzer goo, but not so new that I actually had FuzzedDataProvider. This is a better solution all around in my opinion. I _believe_ this should let us run these tests on most systems, even those using GCC instead of clang. That said, my one attempt to test this on my macOS laptop failed miserably, and I don't feel like doing more work on this right now. Differential Revision: https://phab.mercurial-scm.org/D7566

File last commit:

r43346:2372284d default
r44267:19da643d default
Show More
mockmakedate.py
23 lines | 533 B | text/x-python | PythonLexer
Taapas Agrawal
histedit: add rewrite.update-timestamp support to fold and mess...
r41249 # mock out util.makedate() to supply testable values
from __future__ import absolute_import
import os
from mercurial import pycompat
from mercurial.utils import dateutil
Augie Fackler
formatting: blacken the codebase...
r43346
Taapas Agrawal
histedit: add rewrite.update-timestamp support to fold and mess...
r41249 def mockmakedate():
filename = os.path.join(os.environ['TESTTMP'], 'testtime')
try:
with open(filename, 'rb') as timef:
time = float(timef.read()) + 1
except IOError:
time = 0.0
with open(filename, 'wb') as timef:
timef.write(pycompat.bytestr(time))
return (time, 0)
Augie Fackler
formatting: blacken the codebase...
r43346
Taapas Agrawal
histedit: add rewrite.update-timestamp support to fold and mess...
r41249 dateutil.makedate = mockmakedate