tests/mockblackbox.py
author Gregory Szorc <gregory.szorc@gmail.com>
Thu, 07 Mar 2019 15:37:42 -0800
changeset 41920 c68a1df5c79a
parent 37120 a8a902d7176e
child 43076 2372284d9457
permissions -rw-r--r--
wix: move contrib/wix to contrib/packaging/wix We're trying to consolidate all our packaging code into contrib/packaging. Let's move the WiX files there. Differential Revision: https://phab.mercurial-scm.org/D6096

from __future__ import absolute_import
from mercurial.utils import (
    procutil,
)

# XXX: we should probably offer a devel option to do this in blackbox directly
def getuser():
    return b'bob'
def getpid():
    return 5000

# mock the date and user apis so the output is always the same
def uisetup(ui):
    procutil.getuser = getuser
    procutil.getpid = getpid