spaCy/spacy/tests/test_errors.py

18 lines
311 B
Python
Raw Normal View History

from inspect import isclass
import pytest
from spacy.errors import add_codes
@add_codes
2020-07-12 15:03:23 +03:00
class Errors:
E001 = "error description"
def test_add_codes():
assert Errors.E001 == "[E001] error description"
with pytest.raises(AttributeError):
Errors.E002
assert isclass(Errors.__class__)