Skip to content
Snippets Groups Projects
Commit 7132b76b authored by Georges Racinet's avatar Georges Racinet
Browse files

Merged testing improvements from heptapod-0-7

parents 03cdd275 e55c4457
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -28,7 +28,6 @@
stage: test
image: octobus/ci-py2-hgext3rd:hg-5.2
script:
- make -C /ci/repos/mercurial local
- PYTHONPATH=/ci/repos/mercurial python -c "from mercurial import util; print(util.version())"
- PYTHONPATH=/ci/repos/mercurial ~/.local/bin/py.test --cov heptapod --cov hgext3rd.heptapod
......
......@@ -8,6 +8,8 @@
LocalRepoWrapper,
)
from .utils import switch_user
def init_repo(basedir):
return LocalRepoWrapper.init(
......@@ -23,10 +25,6 @@
))
def switch_user(wrapper, user):
wrapper.repo.ui.environ['REMOTE_USER'] = user
def test_draft_publish(tmpdir):
wrapper = init_repo(tmpdir)
switch_user(wrapper, 'someone')
......
def switch_user(wrapper, user):
"""Common method to change the name of the acting user.
This helps enforcing that it works uniformly for all permission
related hooks.
"""
wrapper.repo.ui.environ['REMOTE_USER'] = user
[pytest]
adopts = --doctest-modules
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment