tests/mockblackbox.py
author Raphaël Gomès <rgomes@octobus.net>
Mon, 24 Oct 2022 15:32:14 +0200
branchstable
changeset 49527 a3356ab610fc
parent 48875 6000f5b25c9b
permissions -rw-r--r--
branching: merge default into stable This marks the feature freeze for the 6.3 release

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