Mercurial > hg
comparison tests/mockblackbox.py @ 37120:a8a902d7176e
procutil: bulk-replace function calls to point to new module
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 24 Mar 2018 15:10:51 +0900 |
parents | f49c3ee5b02f |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
37119:d4a2e0d5d042 | 37120:a8a902d7176e |
---|---|
1 from __future__ import absolute_import | 1 from __future__ import absolute_import |
2 from mercurial import ( | 2 from mercurial.utils import ( |
3 util, | 3 procutil, |
4 ) | 4 ) |
5 | 5 |
6 # XXX: we should probably offer a devel option to do this in blackbox directly | 6 # XXX: we should probably offer a devel option to do this in blackbox directly |
7 def getuser(): | 7 def getuser(): |
8 return b'bob' | 8 return b'bob' |
9 def getpid(): | 9 def getpid(): |
10 return 5000 | 10 return 5000 |
11 | 11 |
12 # mock the date and user apis so the output is always the same | 12 # mock the date and user apis so the output is always the same |
13 def uisetup(ui): | 13 def uisetup(ui): |
14 util.getuser = getuser | 14 procutil.getuser = getuser |
15 util.getpid = getpid | 15 procutil.getpid = getpid |