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
d4249601
Commit
d4249601
authored
11 months ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
add tests for data location check
parent
983c9aa3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!280
Optional location check
Pipeline
#208199
failed with stages
in 3 minutes and 8 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/data/test_grid_spec.py
+10
-0
10 additions, 0 deletions
tests/data/test_grid_spec.py
with
10 additions
and
0 deletions
tests/data/test_grid_spec.py
+
10
−
0
View file @
d4249601
...
...
@@ -292,6 +292,16 @@ class TestGridSpec(unittest.TestCase):
self
.
assertTrue
(
us_grid
==
cp_grid1
)
self
.
assertFalse
(
us_grid
==
cp_grid2
)
def
test_location_check
(
self
):
grid_s1
=
UniformGrid
((
2
,
2
),
data_location
=
"
CELLS
"
)
grid_s2
=
UniformGrid
((
2
,
2
),
data_location
=
"
POINTS
"
)
grid_u1
=
grid_s1
.
to_unstructured
()
grid_u2
=
grid_s2
.
to_unstructured
()
self
.
assertTrue
(
grid_s1
.
compatible_with
(
grid_s2
,
check_location
=
False
))
self
.
assertFalse
(
grid_s1
.
compatible_with
(
grid_s2
,
check_location
=
True
))
self
.
assertTrue
(
grid_u1
.
compatible_with
(
grid_u2
,
check_location
=
False
))
self
.
assertFalse
(
grid_u1
.
compatible_with
(
grid_u2
,
check_location
=
True
))
def
test_equality
(
self
):
grid1
=
UniformGrid
((
2
,
2
),
data_location
=
0
)
grid2
=
UnstructuredGrid
(
...
...
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