Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyjapc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scripting-tools
pyjapc
Merge requests
!112
mockito 5 workaround
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
mockito 5 workaround
feature/mockito-5-workaround
into
master
Overview
4
Commits
2
Pipelines
1
Changes
3
Merged
Michi Hostettler
requested to merge
feature/mockito-5-workaround
into
master
3 months ago
Overview
4
Commits
2
Pipelines
1
Changes
3
Expand
fix JAPC SET with mockito 5
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
c39d8262
2 commits,
3 months ago
3 files
+
19
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
pyjapc/tests/conftest.py
+
11
−
0
Options
@@ -118,3 +118,14 @@ def japc_mock(jvm) -> typing.Generator[typing.Type["cern.japc.ext.mockito.JapcMo
yield
mock
mock
.
resetToDefault
()
mock
.
mockNoService
()
@pytest.fixture
def
japc_set
(
jvm
):
cern
=
jp
.
JPackage
(
'
cern
'
)
JapcUtils
=
cern
.
japc
.
core
.
util
.
JapcUtils
def
setter
(
param
,
selector
,
value
):
result
=
JapcUtils
.
setValuesAsync
({
param
:
value
},
selector
)
exception
=
result
.
values
().
iterator
().
next
().
getException
()
if
exception
is
not
None
:
raise
RuntimeError
(
exception
.
getMessage
())
return
setter
Loading