tests/mockblackbox.py
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 12 Apr 2024 14:09:55 +0100
branchstable
changeset 51566 529a655874fb
parent 48875 6000f5b25c9b
permissions -rw-r--r--
matchers: fix the bug in rust PatternMatcher that made it cut off early This brings the rust output in line with the Python output.

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