Download whisper.cpp/bindings/ruby/test/test_error.rb from Dyen/Rovin: direct link, hf CLI and curl.
- Browser
- Download file 451 Bytes
-
https://huggingface.co/spaces/Dyen/Rovin/resolve/main/whisper.cpp/bindings/ruby/test/test_error.rb
- Command line
-
hf download hf://spaces/Dyen/Rovin/whisper.cpp/bindings/ruby/test/test_error.rb
-
curl -L -o test_error.rb https://huggingface.co/spaces/Dyen/Rovin/resolve/main/whisper.cpp/bindings/ruby/test/test_error.rb
451 Bytes
| require_relative "helper" | |
| class TestError < TestBase | |
| def test_error | |
| error = Whisper::Error.new(-2) | |
| assert_equal "failed to compute log mel spectrogram", error.message | |
| assert_equal(-2, error.code) | |
| end | |
| def test_unknown_error | |
| error = Whisper::Error.new(-20) | |
| assert_equal "unknown error", error.message | |
| end | |
| def test_non_int_code | |
| assert_raise TypeError do | |
| _error = Whisper::Error.new("non int") | |
| end | |
| end | |
| end | |