Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
35
Issue boards
Milestones
Wiki
Code
Merge requests
8
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
rdm-software
SaQC
Commits
44282e7e
Commit
44282e7e
authored
5 years ago
by
Peter Lünenschloß
Browse files
Options
Downloads
Patches
Plain Diff
test-tests now cover over all the flagger
parent
1a69daf7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/funcs/test_spike_detection.py
+6
-1
6 additions, 1 deletion
test/funcs/test_spike_detection.py
with
6 additions
and
1 deletion
test/funcs/test_spike_detection.py
+
6
−
1
View file @
44282e7e
...
...
@@ -11,9 +11,11 @@ from saqc.flagger.simpleflagger import SimpleFlagger
from
saqc.funcs.spike_detection
import
flagSpikes_SpektrumBased
,
flagMad
from
saqc.lib.tools
import
getPandasData
TESTFLAGGERS
=
[
BaseFlagger
([
'
NIL
'
,
'
GOOD
'
,
'
BAD
'
]),
#
DmpFlagger(),
DmpFlagger
(),
SimpleFlagger
()]
...
...
@@ -32,14 +34,17 @@ def test_flagSpikes_SpektrumBased(spiky_data, flagger):
data
=
spiky_data
[
0
]
flags
=
flagger
.
initFlags
(
data
)
data
,
flag_result
=
flagSpikes_SpektrumBased
(
data
,
flags
,
'
spiky_data
'
,
flagger
)
flag_result
=
getPandasData
(
flag_result
,
0
)
test_sum
=
(
flag_result
[
spiky_data
[
1
]]
==
flagger
.
BAD
).
sum
()
assert
test_sum
==
len
(
spiky_data
[
1
])
@pytest.mark.parametrize
(
'
flagger
'
,
TESTFLAGGERS
)
def
test_flagMad
(
spiky_data
,
flagger
):
data
=
spiky_data
[
0
]
flags
=
flagger
.
initFlags
(
data
)
data
,
flag_result
=
flagMad
(
data
,
flags
,
'
spiky_data
'
,
flagger
,
'
1H
'
)
flag_result
=
getPandasData
(
flag_result
,
0
)
test_sum
=
(
flag_result
[
spiky_data
[
1
]]
==
flagger
.
BAD
).
sum
()
assert
test_sum
==
len
(
spiky_data
[
1
])
...
...
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