vinayakrevankar commited on
Commit
6478648
·
1 Parent(s): 1a00545

minor changes in test case

Browse files
Files changed (1) hide show
  1. tests/test_module.py +4 -5
tests/test_module.py CHANGED
@@ -52,11 +52,10 @@ def test_transcribe_local(mock_pipeline, check_audio_file):
52
  mock_pipeline.return_value.return_value['text'] = "Now go away or I shall taunt you a second time!"
53
 
54
  # Call the transcribe function with the mock and use_api=False
55
- result, time_taken = transcribe(check_audio_file, use_api=False)
56
-
57
  print(result)
58
-
59
- # Assert the mocked transcription matches the expected result
60
  assert str(result).strip() == "Now go away or I shall taunt you a second time!"
61
- assert time_taken.startswith('Using local pipeline it took: ')
 
62
 
 
52
  mock_pipeline.return_value.return_value['text'] = "Now go away or I shall taunt you a second time!"
53
 
54
  # Call the transcribe function with the mock and use_api=False
55
+ result, time_taken, memory_usage = transcribe(check_audio_file, use_api=False)
 
56
  print(result)
57
+ # Now you can add assertions for each of these values
 
58
  assert str(result).strip() == "Now go away or I shall taunt you a second time!"
59
+ assert "Using local pipeline" in time_taken
60
+ assert "RAM Used by code" in memory_usage
61