def check_paramInRange(mLow, mHigh): mRange = '%f to %f'% (mLow, mHigh) data = kiknet.paramInRange('MwFnet', mRange, ['gmNo' , 'MwFnet']) Ms_greaterThan = [d['MwFnet'] > mHigh for d in data] Ms_lessThan = [d['MwFnet'] < mLow for d in data] Ms_999 = [d['MwFnet'] == -999 for d in data] assert not any(Ms_greaterThan) assert not any(Ms_lessThan) assert not any(Ms_999)
def check_range_returnsData(mLow , mHigh): mRange = '%f to %f' % (mLow , mHigh) data = kiknet.paramInRange('MwFnet', mRange, ['gmNo' , 'MwFnet']) assert len(data) > 0