Skip to content

Commit

Permalink
Remove deprecated comments from test script
Browse files Browse the repository at this point in the history
  • Loading branch information
bulletinmybeard committed Oct 26, 2024
1 parent 27b89fb commit 42e66b5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions tests/test_mic_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def test_is_audio_active_success(mock_sounddevice):
# Simulate audio recording with values that will produce RMS > threshold
mock_rec.return_value = np.array([[0.1], [0.2], [0.3]])

# Changed to use 'assert' directly on the boolean result
assert is_audio_active(threshold=0.01, duration=1.0)


Expand All @@ -76,15 +75,13 @@ def test_is_audio_active_no_sound(mock_sounddevice):
# Simulate audio recording with values that will produce RMS < threshold
mock_rec.return_value = np.array([[0.001], [0.002], [0.001]])

# Changed to use 'not' for negative assertion
assert not is_audio_active(threshold=0.01, duration=1.0)


def test_is_audio_active_error(mock_sounddevice):
mock_query, _, _ = mock_sounddevice
mock_query.side_effect = Exception("Device error")

# Changed to use 'not' for negative assertion
assert not is_audio_active()


Expand Down

0 comments on commit 42e66b5

Please sign in to comment.