mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
1ee6f788c8
With util.getpid, it is now possible to define fixed pids. Future iterations can define a map of pids on a locked first come first serve basis to create a more realistic harness, but for now this is good enough. This applies to blackbox, but could apply to other tests as well.
15 lines
284 B
Python
15 lines
284 B
Python
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
|