view tests/mockblackbox.py @ 43856:229215fc1c1c

fuzz: fix mpatch_corpus to not have an overridden __repr__ on py3 Differential Revision: https://phab.mercurial-scm.org/D7606
author Kyle Lippincott <spectral@google.com>
date Wed, 11 Dec 2019 15:23:54 -0800
parents 2372284d9457
children 6000f5b25c9b
line wrap: on
line source

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