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
3
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
8cd1e01d
Commit
8cd1e01d
authored
4 months ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
tests: correct function paths
parent
4b1675a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!286
Add mask to Info object
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/data/test_tools.py
+9
-5
9 additions, 5 deletions
tests/data/test_tools.py
with
9 additions
and
5 deletions
tests/data/test_tools.py
+
9
−
5
View file @
8cd1e01d
...
...
@@ -284,10 +284,10 @@ class TestDataTools(unittest.TestCase):
finam
.
Info
(
time
,
grid
=
finam
.
NoGrid
()),
)
finam
.
data
.
tools
.
_check_shape
(
xdata
.
shape
[
1
:],
finam
.
NoGrid
())
finam
.
data
.
tools
.
core
.
_check_shape
(
xdata
.
shape
[
1
:],
finam
.
NoGrid
())
with
self
.
assertRaises
(
finam
.
errors
.
FinamDataError
):
finam
.
data
.
tools
.
_check_shape
(
xdata
.
shape
[
1
:],
finam
.
NoGrid
(
dim
=
1
))
finam
.
data
.
tools
.
core
.
_check_shape
(
xdata
.
shape
[
1
:],
finam
.
NoGrid
(
dim
=
1
))
def
test_quantify
(
self
):
xdata
=
np
.
asarray
([
1.0
])
...
...
@@ -312,15 +312,19 @@ class TestDataTools(unittest.TestCase):
def
test_cache_units
(
self
):
finam
.
data
.
tools
.
clear_units_cache
()
self
.
assertEqual
({},
finam
.
data
.
tools
.
_UNIT_PAIRS_CACHE
)
self
.
assertEqual
({},
finam
.
data
.
tools
.
units
.
_UNIT_PAIRS_CACHE
)
eqiv
=
finam
.
data
.
tools
.
equivalent_units
(
"
mm
"
,
"
L/m^2
"
)
self
.
assertTrue
(
eqiv
)
self
.
assertEqual
(
{(
finam
.
UNITS
.
Unit
(
"
mm
"
),
finam
.
UNITS
.
Unit
(
"
L/m^2
"
)):
(
True
,
True
)},
finam
.
data
.
tools
.
_UNIT_PAIRS_CACHE
,
finam
.
data
.
tools
.
units
.
_UNIT_PAIRS_CACHE
,
)
finam
.
data
.
tools
.
clear_units_cache
()
self
.
assertEqual
({},
finam
.
data
.
tools
.
_UNIT_PAIRS_CACHE
)
self
.
assertEqual
({},
finam
.
data
.
tools
.
units
.
_UNIT_PAIRS_CACHE
)
if
__name__
==
"
__main__
"
:
unittest
.
main
()
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