I have some code that uses the sounddevice library in a callback function. I need to use pytest inorder to test this callback function. I am simply trying to test if the callback function does not raise an exception. however, pytest keeps reporting that the "indata" parameter of the callback function is not defined. Although, I am importing my callback function into my test file. FYI, my original code is working fine, no issues with callback indata. I am rather new to python coding, so any help is greatly appreciated. Thanks.
from project import callback
def test_callback():
try:
callback(indata, frames, time, status)
except ValueError:
assert False
FROM PYTEST...
_________ test_callback _________
def test_callback():
try:
callback(indata, frames, time, status)
E NameError: name 'indata' is not defined