tests for tokeniser and types
Cover WordTokeniser (Unicode, empty input, punctuation, multiple scripts) and validation types (immutability, edge cases, failure summary).
This commit is contained in:
20
tests/conftest.py
Normal file
20
tests/conftest.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""Shared pytest fixtures for Veritext tests."""
|
||||
|
||||
import pytest
|
||||
|
||||
from veritext.core.tokenisation import WordTokeniser
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def word_tokeniser() -> WordTokeniser:
|
||||
return WordTokeniser()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def word_tokeniser_no_lowercase() -> WordTokeniser:
|
||||
return WordTokeniser(lowercase=False)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def word_tokeniser_keep_punctuation() -> WordTokeniser:
|
||||
return WordTokeniser(remove_punctuation=False)
|
||||
Reference in New Issue
Block a user