def test_libsndfile_error_with_prefix(): err = sf.LibsndfileError(2, prefix="XX ") assert isinstance(err, sf.SoundFileError) assert err.error_string # cannot assume exact message generated by libsndfile assert str(err) == "XX " + err.error_string
def test_libsndfile_error(): err = sf.LibsndfileError(2) assert isinstance(err, sf.SoundFileError) assert err.error_string # cannot assume exact message generated by libsndfile assert str(err) == err.error_string