Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
skais
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Raphael Sturgis
skais
Commits
ff0fad14
Commit
ff0fad14
authored
3 years ago
by
Raphael
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
77a9bdf2
Branches
Branches containing commit
No related tags found
3 merge requests
!15
Resolve "normalisation should raise exception when bad arguments given"
,
!14
Resolve "normalisation should raise exception when bad arguments given"
,
!13
Draft: Develop
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
skais/tests/ais/test_ais_points.py
+34
-0
34 additions, 0 deletions
skais/tests/ais/test_ais_points.py
with
34 additions
and
0 deletions
skais/tests/ais/test_ais_points.py
+
34
−
0
View file @
ff0fad14
...
@@ -216,6 +216,40 @@ class TestAISPositions(unittest.TestCase):
...
@@ -216,6 +216,40 @@ class TestAISPositions(unittest.TestCase):
pd
.
testing
.
assert_frame_equal
(
expected
.
reset_index
(
drop
=
True
),
result
.
reset_index
(
drop
=
True
),
pd
.
testing
.
assert_frame_equal
(
expected
.
reset_index
(
drop
=
True
),
result
.
reset_index
(
drop
=
True
),
check_exact
=
False
,
rtol
=
0.05
)
check_exact
=
False
,
rtol
=
0.05
)
def
test_normalize_wrong_arguments_1
(
self
):
ais_points
=
AISPoints
(
pd
.
DataFrame
(
{
"
cog
"
:
[
i
for
i
in
range
(
0
,
359
,
10
)],
"
heading
"
:
[
180
for
_
in
range
(
0
,
359
,
10
)]
}
)
)
with
self
.
assertRaises
(
ValueError
):
ais_points
.
normalize
(
normalization_dict
=
None
)
def
test_normalize_wrong_arguments_2
(
self
):
ais_points
=
AISPoints
(
pd
.
DataFrame
(
{
"
cog
"
:
[
i
for
i
in
range
(
0
,
359
,
10
)],
"
heading
"
:
[
180
for
_
in
range
(
0
,
359
,
10
)]
}
)
)
with
self
.
assertRaises
(
ValueError
):
ais_points
.
normalize
(
normalization_dict
=
10
)
def
test_normalize_wrong_arguments_3
(
self
):
ais_points
=
AISPoints
(
pd
.
DataFrame
(
{
"
cog
"
:
[
i
for
i
in
range
(
0
,
359
,
10
)],
"
heading
"
:
[
180
for
_
in
range
(
0
,
359
,
10
)]
}
)
)
with
self
.
assertRaises
(
ValueError
):
ais_points
.
normalize
(
normalization_dict
=
[
0
,
1
,
2
,
3
,
4
])
def
test_compute_drift
(
self
):
def
test_compute_drift
(
self
):
ais_points
=
AISPoints
(
pd
.
DataFrame
(
ais_points
=
AISPoints
(
pd
.
DataFrame
(
{
{
...
...
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