Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
shantnu authored Sep 21, 2024
1 parent 4050f7f commit c239fab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test_audio.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from audio import get_freq,create_wave,noisy
import os
import math


def test_create_wave():
try:
Expand All @@ -15,5 +17,8 @@ def test_get_freq():

def test_noisy():
a,b = noisy.noisy(True)
assert(a==24000.0)
assert(b==1000)
tolerance = 0.1


assert math.isclose(a, 24000.0, rel_tol=tolerance), f"a={a} is not within tolerance of 24000.0"
assert math.isclose(b, 1000.0, rel_tol=tolerance), f"a={a} is not within tolerance of 24000.0"

0 comments on commit c239fab

Please sign in to comment.