Skip to content
Snippets Groups Projects
Commit a085c04b authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones
Browse files

Add format 3 tests for lvcnrcheck

parent 1257b978
No related branches found
No related tags found
No related merge requests found
......@@ -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_components(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_components(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_components(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_components(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_components(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_components(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_components(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_components(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_components(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_components(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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment