From f420aa1138f52c732102b6ad00825bab797792ec Mon Sep 17 00:00:00 2001 From: svlandeg Date: Tue, 15 Sep 2020 22:30:09 +0200 Subject: [PATCH] use e.value to get to the ExceptionInfo value --- spacy/tests/test_language.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacy/tests/test_language.py b/spacy/tests/test_language.py index fba362b76..2a24d368a 100644 --- a/spacy/tests/test_language.py +++ b/spacy/tests/test_language.py @@ -298,4 +298,4 @@ def test_language_init_invalid_vocab(value): err_fragment = "invalid value" with pytest.raises(ValueError) as e: Language(value) - assert err_fragment in str(e) + assert err_fragment in str(e.value)