f877c37fc6
tests / Test (windows-latest, 3.13) (push) Blocked by required conditions
tests / Test (windows-latest, 3.14) (push) Blocked by required conditions
tests / Validate (push) Waiting to run
tests / Test (macos-latest, 3.10) (push) Blocked by required conditions
tests / Test (macos-latest, 3.11) (push) Blocked by required conditions
tests / Test (macos-latest, 3.12) (push) Blocked by required conditions
tests / Test (macos-latest, 3.13) (push) Blocked by required conditions
tests / Test (macos-latest, 3.14) (push) Blocked by required conditions
tests / Test (ubuntu-latest, 3.10) (push) Blocked by required conditions
tests / Test (ubuntu-latest, 3.11) (push) Blocked by required conditions
tests / Test (ubuntu-latest, 3.12) (push) Blocked by required conditions
tests / Test (ubuntu-latest, 3.13) (push) Blocked by required conditions
tests / Test (ubuntu-latest, 3.14) (push) Blocked by required conditions
tests / Test (windows-latest, 3.10) (push) Blocked by required conditions
tests / Test (windows-latest, 3.11) (push) Blocked by required conditions
tests / Test (windows-latest, 3.12) (push) Blocked by required conditions
universe validation / Validate (push) Waiting to run
17 lines
333 B
Python
17 lines
333 B
Python
from inspect import isclass
|
|
|
|
import pytest
|
|
|
|
from spacy.errors import ErrorsWithCodes
|
|
|
|
|
|
class Errors(metaclass=ErrorsWithCodes):
|
|
E001 = "error description"
|
|
|
|
|
|
def test_add_codes():
|
|
assert Errors.E001 == "[E001] error description"
|
|
with pytest.raises(AttributeError):
|
|
Errors.E002
|
|
assert isclass(Errors.__class__)
|