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

Add tests for format 2 datasets

parent f96a54ca
No related branches found
No related tags found
No related merge requests found
......@@ -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
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