mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 13:47:13 +03:00
18 lines
319 B
Python
18 lines
319 B
Python
from inspect import isclass
|
|
|
|
import pytest
|
|
|
|
from spacy.errors import add_codes
|
|
|
|
|
|
@add_codes
|
|
class Errors(object):
|
|
E001 = "error description"
|
|
|
|
|
|
def test_add_codes():
|
|
assert Errors.E001 == "[E001] error description"
|
|
with pytest.raises(AttributeError):
|
|
Errors.E002
|
|
assert isclass(Errors.__class__)
|