tests/mockblackbox.py
author Gregory Szorc <gregory.szorc@gmail.com>
Fri, 08 Mar 2019 10:27:40 -0800
changeset 41923 c7c7edd46849
parent 37120 a8a902d7176e
child 43076 2372284d9457
permissions -rw-r--r--
wix: remove pywin32 This dependency was for ancient Mercurial versions. We recently removed it from the Inno Setup installers. So let's remove it from the WiX installers as well. .. bc:: The Windows MSI installers no longer include the pywin32 Python package. Differential Revision: https://phab.mercurial-scm.org/D6100

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