Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
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
calibration
pycalibration
Commits
9847e518
Commit
9847e518
authored
1 year ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for .select_modules() method
parent
4229e8a0
No related branches found
No related tags found
1 merge request
!885
Revised CalCat API
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_calcat_interface2.py
+16
-0
16 additions, 0 deletions
tests/test_calcat_interface2.py
with
16 additions
and
0 deletions
tests/test_calcat_interface2.py
+
16
−
0
View file @
9847e518
...
...
@@ -72,6 +72,22 @@ def test_DSSC_modules_missing():
assert
dssc_cd
.
module_nums
==
modnos
assert
dssc_cd
.
qm_names
==
[
f
"
Q
{
(
m
//
4
)
+
1
}
M
{
(
m
%
4
)
+
1
}
"
for
m
in
modnos
]
offset
=
dssc_cd
[
"
Offset
"
]
assert
offset
.
module_nums
==
modnos
# test ModulesConstantVersions.select_modules()
modnos_q3
=
list
(
range
(
8
,
12
))
aggs_q3
=
[
f
"
DSSC
{
m
:
02
}
"
for
m
in
modnos_q3
]
qm_q3
=
[
f
"
Q3M
{
i
}
"
for
i
in
range
(
1
,
5
)]
assert
offset
.
select_modules
(
modnos_q3
).
module_nums
==
modnos_q3
assert
offset
.
select_modules
(
aggregators
=
aggs_q3
).
module_nums
==
modnos_q3
assert
offset
.
select_modules
(
qm_names
=
qm_q3
).
module_nums
==
modnos_q3
# test CalibrationData.select_modules()
assert
dssc_cd
.
select_modules
(
modnos_q3
).
module_nums
==
modnos_q3
assert
dssc_cd
.
select_modules
(
aggregators
=
aggs_q3
).
module_nums
==
modnos_q3
assert
dssc_cd
.
select_modules
(
qm_names
=
qm_q3
).
module_nums
==
modnos_q3
@pytest.mark.requires_gpfs
def
test_LPD_constant_missing
():
...
...
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