view tests/mockblackbox.py @ 51727:a65c2dddbf5d

linelog: correct the default value of `annotateresult.lines` This was flagged by pytype once it was tricked into using the standard `attr` package instead of the vendored copy.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 23 Jul 2024 19:05:26 -0400
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