Files
wehub-resource-sync 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
chore: import upstream snapshot with attribution
2026-07-13 12:37:51 +08:00

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__)