From d6963b8a12e7930b942323fe869799837745c766 Mon Sep 17 00:00:00 2001 From: Siddharth Singh Rana <91743459+NIXBLACK11@users.noreply.github.com> Date: Sun, 19 Nov 2023 22:07:24 +0530 Subject: [PATCH] Update test_laser_tokenizer.py --- laser_encoders/test_laser_tokenizer.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/laser_encoders/test_laser_tokenizer.py b/laser_encoders/test_laser_tokenizer.py index e3232506..45449ffe 100644 --- a/laser_encoders/test_laser_tokenizer.py +++ b/laser_encoders/test_laser_tokenizer.py @@ -289,15 +289,22 @@ def test_encoder_non_normalization(tmp_path: Path, test_readme_params: dict): def test_optional_lang_with_laser2(tmp_path: Path): - with pytest.warns(UserWarning, match="The 'lang' parameter is optional when using 'laser2'. It will be ignored."): + with pytest.warns( + UserWarning, + match="The 'lang' parameter is optional when using 'laser2'. It will be ignored." + ): encoder = LaserEncoderPipeline(lang="en", laser="laser2", model_dir=tmp_path) def test_required_lang_with_laser3(tmp_path: Path): - with pytest.raises(ValueError, match="For 'laser3', the 'lang' parameter is required."): + with pytest.raises( + ValueError,match="For 'laser3', the 'lang' parameter is required." + ): encoder = LaserEncoderPipeline(laser="laser3", model_dir=tmp_path) def test_missing_lang_and_laser(tmp_path: Path): - with pytest.raises(ValueError, match="Either 'laser' or 'lang' should be provided."): + with pytest.raises( + ValueError, match="Either 'laser' or 'lang' should be provided." + ): encoder = LaserEncoderPipeline(model_dir=tmp_path)