Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_cB_conversion():
assert cB_to_freq(0) == 1.
assert cB_to_freq(-100) == pytest.approx(0.1)
assert cB_to_freq(-600) == pytest.approx(1e-6)
def test_failed_cB_conversion():
with pytest.raises(ValueError):
cB_to_freq(1)
def test_cB_conversion():
assert cB_to_freq(0) == 1.
assert cB_to_freq(-100) == pytest.approx(0.1)
assert cB_to_freq(-600) == pytest.approx(1e-6)