Mercurial > hg
view tests/mockblackbox.py @ 31419:1fc3d1f02865
scmutil: make function name bytes in class filecache
func.__name__ returns unicodes and this leads to keyerror when we try
to do filecache[''] by passing bytes.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 16 Mar 2017 06:32:33 +0530 |
parents | 417380aa5bbe |
children | 043948c84647 |
line wrap: on
line source
from __future__ import absolute_import from mercurial import ( util, ) def makedate(): return 0, 0 def getuser(): return 'bob' def getpid(): return 5000 # mock the date and user apis so the output is always the same def uisetup(ui): util.makedate = makedate util.getuser = getuser util.getpid = getpid