view tests/mockblackbox.py @ 52310:a876ab6c3fd5

rust: fix `cargo doc` warnings It makes sense to keep our doc build happy, even if it is lacking.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 04 Nov 2024 15:17:54 +0100
parents ca7bde5dbafb
children
line wrap: on
line source

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