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
34655efc
Commit
34655efc
authored
1 month ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
tests: make pint test for dimensionless safe
parent
1aab0fa3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!290
Prepare v1.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/data/test_cf_units.py
+5
-3
5 additions, 3 deletions
tests/data/test_cf_units.py
with
5 additions
and
3 deletions
tests/data/test_cf_units.py
+
5
−
3
View file @
34655efc
...
...
@@ -23,9 +23,11 @@ class TestCfUnits(unittest.TestCase):
self
.
assertEqual
(
u
(
"
degC
"
),
"
°C
"
)
self
.
assertEqual
(
u
(
"
degree_Celsius
"
),
"
°C
"
)
self
.
assertEqual
(
u
(
""
),
"
1
"
)
self
.
assertEqual
(
u
(
"
1
"
),
"
1
"
)
self
.
assertEqual
(
u
(
"
m/m
"
),
"
1
"
)
# "dimensionless" representation inconsistent across different pint versions
# will be "1" for newer versions (>=0.24.1) to be in line with cf-conventions
self
.
assertTrue
(
u
(
""
)
in
(
"
1
"
,
"
dimensionless
"
,
""
))
self
.
assertTrue
(
u
(
"
1
"
)
in
(
"
1
"
,
"
dimensionless
"
,
""
))
self
.
assertTrue
(
u
(
"
m/m
"
)
in
(
"
1
"
,
"
dimensionless
"
,
""
))
self
.
assertEqual
(
u
(
"
m/s
"
),
"
m s-1
"
)
self
.
assertEqual
(
u
(
"
m s-1
"
),
"
m s-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