Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
py-heptapod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
heptapod
py-heptapod
Commits
7132b76b
There was a problem fetching the pipeline summary.
Commit
7132b76b
authored
5 years ago
by
Georges Racinet
Browse files
Options
Downloads
Plain Diff
Merged testing improvements from heptapod-0-7
parents
03cdd275
e55c4457
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+0
-1
0 additions, 1 deletion
.gitlab-ci.yml
heptapod/hooks/tests/test_check_publish.py
+2
-4
2 additions, 4 deletions
heptapod/hooks/tests/test_check_publish.py
heptapod/hooks/tests/utils.py
+7
-0
7 additions, 0 deletions
heptapod/hooks/tests/utils.py
pytest.ini
+2
-0
2 additions, 0 deletions
pytest.ini
with
11 additions
and
5 deletions
.gitlab-ci.yml
+
0
−
1
View file @
7132b76b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
heptapod/hooks/tests/test_check_publish.py
+
2
−
4
View file @
7132b76b
...
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
heptapod/hooks/tests/utils.py
0 → 100644
+
7
−
0
View file @
7132b76b
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
This diff is collapsed.
Click to expand it.
pytest.ini
0 → 100644
+
2
−
0
View file @
7132b76b
[pytest]
adopts
=
--doctest-modules
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment