tests/mockblackbox.py
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 18 May 2017 09:04:37 -0700
changeset 32362 23c9a2a71c6e
parent 28943 417380aa5bbe
child 32450 043948c84647
permissions -rw-r--r--
match: make _fileroots a @propertycache and rename it to _fileset The files in the set are not necesserily roots of anything. Making it a @propertycache will help towards extracting a base class for matchers.

from __future__ import absolute_import
from mercurial import (
    util,
)

def makedate():
    return 0, 0
def getuser():
    return 'bob'
def getpid():
    return 5000

# mock the date and user apis so the output is always the same
def uisetup(ui):
    util.makedate = makedate
    util.getuser = getuser
    util.getpid = getpid