Commit 06ccc67e authored by Edward Fauchon-Jones's avatar Edward Fauchon-Jones
Browse files

Add peak near zero test

parent 5cdf7e78
Pipeline #21009 passed with stage
in 2 minutes and 1 second
......@@ -1849,3 +1849,23 @@ class TestAmplm(TestROMSpline):
(output, returncode) = helper.lvcnrcheck(['-f', '3', self.f.name], returncode=True)
assert output.strip() == self.output
assert returncode == 1
class TestPeakNearZero(TestInterfield):
name = 'peak-near-zero'
def test_invalid_peak_location(self):
self.setOutput(
('- [INVALID INTERFIELD] peak-near-zero (waveform peak is at '
'-99.12M which is greater than 10.00M from zero)'))
nr = h5.File(self.f.name)
keys = [k for k in nr.keys() if k.startswith('amp_l')]
for k in keys:
nr[k]['X'][:] -= 100.0
nr.close()
(output, returncode) = helper.lvcnrcheck(['-f', '3', self.f.name], returncode=True)
assert output.strip() == self.output
assert returncode == 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment