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
e4bb76ee
Commit
e4bb76ee
authored
8 years ago
by
Edward Fauchon-Jones
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for format 2 datasets
parent
f96a54ca
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
-0
192 additions, 0 deletions
lvcnrpy/test/test_lvcnrcheck.py
with
192 additions
and
0 deletions
lvcnrpy/test/test_lvcnrcheck.py
+
192
−
0
View file @
e4bb76ee
...
...
@@ -768,3 +768,195 @@ class TestInvalidMass1VsTime(TestDataset):
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidMass2VsTime
(
TestDataset
):
name
=
'
mass2-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] mass2-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] mass2-vs-time (1)
'
'
(Dataset contains 1 columns but should have 2)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin1VsTime
(
TestDataset
):
name
=
'
spin1-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] spin1-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] spin1-vs-time (1)
'
'
(Dataset contains 1 columns but should have 4)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin2VsTime
(
TestDataset
):
name
=
'
spin2-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] spin2-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] spin2-vs-time (1)
'
'
(Dataset contains 1 columns but should have 4)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidPosition1VsTime
(
TestDataset
):
name
=
'
position1-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] position1-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] position1-vs-time (1)
'
'
(Dataset contains 1 columns but should have 4)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidPosition2VsTime
(
TestDataset
):
name
=
'
position2-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] position2-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] position2-vs-time (1)
'
'
(Dataset contains 1 columns but should have 4)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidLNhatVsTime
(
TestDataset
):
name
=
'
LNhat-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] LNhat-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] LNhat-vs-time (1)
'
'
(Dataset contains 1 columns but should have 4)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidOmegaVsTime
(
TestDataset
):
name
=
'
Omega-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] Omega-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] Omega-vs-time (1)
'
'
(Dataset contains 1 columns but should have 2)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidNhatVsTime
(
TestDataset
):
name
=
'
nhat-vs-time
'
def
test_invalid_type
(
self
):
self
.
convertToGroup
()
self
.
setOutput
(
(
'
- [WRONG TYPE] nhat-vs-time
'
'
(<class
\'
h5py._hl.group.Group
\'
>)
'
'
(Type must be <class
\'
h5py._hl.dataset.Dataset
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
'
-f
'
,
'
3
'
,
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_component_count
(
self
):
self
.
setComponenetCount
(
1
)
self
.
setOutput
(
(
'
- [INVALID VALUE] nhat-vs-time (1)
'
'
(Dataset contains 1 columns but should have 4)
'
))
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