Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
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
FINAM
finam
Commits
fb69f030
Commit
fb69f030
authored
1 year ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
tests: fix UnitStrippedWarning
parent
8f9f72ac
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!260
Masked array support
Pipeline
#188284
passed with stages
in 5 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/modules/test_parametric.py
+7
-5
7 additions, 5 deletions
tests/modules/test_parametric.py
with
7 additions
and
5 deletions
tests/modules/test_parametric.py
+
7
−
5
View file @
fb69f030
...
...
@@ -42,7 +42,7 @@ class TestParametricGrid(unittest.TestCase):
data
=
sink
.
data
[
"
Input
"
]
self
.
assertEqual
(
data
.
shape
,
(
1
,
19
))
assert_allclose
(
data
[
0
],
in_info
.
grid
.
data_axes
[
0
])
assert_allclose
(
data
[
0
]
.
magnitude
,
in_info
.
grid
.
data_axes
[
0
])
def
test_parametric_2d
(
self
):
time
=
datetime
(
2000
,
1
,
1
)
...
...
@@ -151,7 +151,7 @@ class TestParametricGrid(unittest.TestCase):
data
=
sink
.
data
[
"
Input
"
]
self
.
assertEqual
(
data
.
shape
,
(
1
,
100
))
assert_allclose
(
data
[
0
],
[
p
[
0
]
for
p
in
in_info
.
grid
.
points
])
assert_allclose
(
data
[
0
]
.
magnitude
,
[
p
[
0
]
for
p
in
in_info
.
grid
.
points
])
def
test_parametric_points_2d
(
self
):
time
=
datetime
(
2000
,
1
,
1
)
...
...
@@ -187,7 +187,7 @@ class TestParametricGrid(unittest.TestCase):
data
=
sink
.
data
[
"
Input
"
]
self
.
assertEqual
(
data
.
shape
,
(
1
,
100
))
assert_allclose
(
data
[
0
],
[
p
[
0
]
*
p
[
1
]
for
p
in
in_info
.
grid
.
points
])
assert_allclose
(
data
[
0
]
.
magnitude
,
[
p
[
0
]
*
p
[
1
]
for
p
in
in_info
.
grid
.
points
])
def
test_parametric_points_3d
(
self
):
time
=
datetime
(
2000
,
1
,
1
)
...
...
@@ -223,7 +223,9 @@ class TestParametricGrid(unittest.TestCase):
data
=
sink
.
data
[
"
Input
"
]
self
.
assertEqual
(
data
.
shape
,
(
1
,
100
))
assert_allclose
(
data
[
0
],
[
p
[
0
]
*
p
[
1
]
-
p
[
2
]
for
p
in
in_info
.
grid
.
points
])
assert_allclose
(
data
[
0
].
magnitude
,
[
p
[
0
]
*
p
[
1
]
-
p
[
2
]
for
p
in
in_info
.
grid
.
points
]
)
def
test_parametric_fail_nogrid
(
self
):
time
=
datetime
(
2000
,
1
,
1
)
...
...
@@ -290,5 +292,5 @@ class TestStaticParametricGrid(unittest.TestCase):
composition
.
run
(
end_time
=
None
)
data_2
=
sink
.
data
[
"
Input
"
][
0
,
...]
assert_allclose
(
data_1
,
data_2
)
assert_allclose
(
data_1
.
magnitude
,
data_2
.
magnitude
)
self
.
assertEqual
(
data_2
.
shape
,
(
19
,
14
))
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