def test_ensure_minimal_intersection_ratio(self): scale = GeometricScale(start_center_hz=300, stop_center_hz=3030, bandwidth_ratio=0.017, n_bands=300) try: scale.ensure_overlap_ratio(0.5) except AssertionError: self.fail('AssertionError was raised')
def test_ensure_minimal_inersection_ratio_insufficient_overlap(self): scale = GeometricScale(start_center_hz=300, stop_center_hz=3030, bandwidth_ratio=0.01, n_bands=300) self.assertRaises(AssertionError, lambda: scale.ensure_overlap_ratio(0.5))