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
6289b75c
Commit
6289b75c
authored
8 years ago
by
Edward Fauchon-Jones
Browse files
Options
Downloads
Patches
Plain Diff
Add remaining format 1 unit tests
parent
6b630cd8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lvcnrpy/test/test_lvcnrcheck.py
+312
-0
312 additions, 0 deletions
lvcnrpy/test/test_lvcnrcheck.py
with
312 additions
and
0 deletions
lvcnrpy/test/test_lvcnrcheck.py
+
312
−
0
View file @
6289b75c
...
...
@@ -366,3 +366,315 @@ class TestInvalidProductionRun(TestField):
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidObject1
(
TestField
):
name
=
'
object1
'
def
test_invalid_type
(
self
):
self
.
setValue
(
1.0
)
self
.
setOutput
(
(
'
- [WRONG TYPE] object1 (1.0)
'
'
(Type must be <type
\'
basestring
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_value
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [INVALID VALUE] object1 (invalid)
'
'
(Value must be one of BH, NS)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidObject2
(
TestField
):
name
=
'
object2
'
def
test_invalid_type
(
self
):
self
.
setValue
(
1.0
)
self
.
setOutput
(
(
'
- [WRONG TYPE] object2 (1.0)
'
'
(Type must be <type
\'
basestring
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
def
test_invalid_value
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [INVALID VALUE] object2 (invalid)
'
'
(Value must be one of BH, NS)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidMass1
(
TestField
):
name
=
'
mass1
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] mass1 (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidMass2
(
TestField
):
name
=
'
mass2
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] mass2 (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidEta
(
TestField
):
name
=
'
eta
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] eta (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidFLowerAt1MSUN
(
TestField
):
name
=
'
f_lower_at_1MSUN
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] f_lower_at_1MSUN (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin1x
(
TestField
):
name
=
'
spin1x
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] spin1x (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin1y
(
TestField
):
name
=
'
spin1y
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] spin1y (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin1z
(
TestField
):
name
=
'
spin1z
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] spin1z (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin2x
(
TestField
):
name
=
'
spin2x
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] spin2x (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin2y
(
TestField
):
name
=
'
spin2y
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] spin2y (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidSpin2z
(
TestField
):
name
=
'
spin2z
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] spin2z (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidLNhatx
(
TestField
):
name
=
'
LNhatx
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] LNhatx (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidLNhaty
(
TestField
):
name
=
'
LNhaty
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] LNhaty (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidLNhatz
(
TestField
):
name
=
'
LNhatz
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] LNhatz (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidNhatx
(
TestField
):
name
=
'
nhatx
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] nhatx (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidNhaty
(
TestField
):
name
=
'
nhaty
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] nhaty (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidNhatz
(
TestField
):
name
=
'
nhatz
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] nhatz (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidOmega
(
TestField
):
name
=
'
Omega
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] Omega (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidEccentricity
(
TestField
):
name
=
'
eccentricity
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] eccentricity (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
self
.
f
.
name
])
assert
output
.
strip
()
==
self
.
output
class
TestInvalidMeanAnomaly
(
TestField
):
name
=
'
mean_anomaly
'
def
test_invalid_type
(
self
):
self
.
setValue
(
'
invalid
'
)
self
.
setOutput
(
(
'
- [WRONG TYPE] mean_anomaly (invalid)
'
'
(Type must be <type
\'
float
\'
>)
'
))
output
=
helper
.
lvcnrcheck
([
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