Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lvcnrpy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
waveforms
lvcnrpy
Commits
a085c04b
Commit
a085c04b
authored
8 years ago
by
Edward Fauchon-Jones
Browse files
Options
Downloads
Patches
Plain Diff
Add format 3 tests for lvcnrcheck
parent
1257b978
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lvcnrpy/test/test_lvcnrcheck.py
+192
-10
192 additions, 10 deletions
lvcnrpy/test/test_lvcnrcheck.py
with
192 additions
and
10 deletions
lvcnrpy/test/test_lvcnrcheck.py
+
192
−
10
View file @
a085c04b
...
...
@@ -983,7 +983,7 @@ class TestInvalidPosition1xVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] position1x-vs-time
'
...
...
@@ -1009,7 +1009,7 @@ class TestInvalidPosition1yVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] position1y-vs-time
'
...
...
@@ -1035,7 +1035,7 @@ class TestInvalidPosition1zVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] position1z-vs-time
'
...
...
@@ -1061,7 +1061,7 @@ class TestInvalidPosition2xVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] position2x-vs-time
'
...
...
@@ -1087,7 +1087,7 @@ class TestInvalidPosition2yVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] position2y-vs-time
'
...
...
@@ -1113,7 +1113,7 @@ class TestInvalidPosition2zVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] position2z-vs-time
'
...
...
@@ -1139,7 +1139,7 @@ class TestInvalidLNhatxVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] LNhatx-vs-time
'
...
...
@@ -1165,7 +1165,7 @@ class TestInvalidLNhatyVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] LNhaty-vs-time
'
...
...
@@ -1191,7 +1191,7 @@ class TestInvalidLNhatzVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] LNhatz-vs-time
'
...
...
@@ -1217,7 +1217,7 @@ class TestInvalidOmegaVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component
_count
(
self
):
def
test_invalid_component
s
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] Omega-vs-time
'
...
...
@@ -1227,3 +1227,185 @@ class TestInvalidOmegaVsTime(TestROMSpline):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantMassVsTime
(
TestROMSpline
):
name
=
'
remnant-mass-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-mass-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-mass-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, Mr])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantSpinxVsTime
(
TestROMSpline
):
name
=
'
remnant-spinx-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-spinx-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-spinx-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, chix])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantSpinyVsTime
(
TestROMSpline
):
name
=
'
remnant-spiny-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-spiny-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-spiny-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, chiy])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantSpinzVsTime
(
TestROMSpline
):
name
=
'
remnant-spinz-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-spinz-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-spinz-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, chiz])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantPositionxVsTime
(
TestROMSpline
):
name
=
'
remnant-positionx-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-positionx-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-positionx-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, cx])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantPositionyVsTime
(
TestROMSpline
):
name
=
'
remnant-positiony-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-positiony-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-positiony-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, cy])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestRemnantPositionzVsTime
(
TestROMSpline
):
name
=
'
remnant-positionz-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToDataset
()
self
.
setOutput
(
(
'
- [WRONG TYPE] remnant-positionz-vs-time
'
'
(<class
\'
h5py._hl.dataset.Dataset
\'
>)
'
'
(Type must be <class
\'
h5py._hl.group.Group
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_components
(
self
):
self
.
setComponents
([
'
invalid-1
'
,
'
invalid-2
'
])
self
.
setOutput
(
(
'
- [INVALID VALUE] remnant-positionz-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Field has subfields [invalid-1, invalid-2]
'
'
but should have [t_horizon, cz])
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
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