dragoman / tests /conftest.py
ciscoriordan's picture
Add test suite for model card, config, tokenizer, weights, and inference
15b74aa
raw
history blame contribute delete
583 Bytes
"""Pytest configuration for Dragoman model tests."""
def pytest_addoption(parser):
parser.addoption(
"--slow", action="store_true", default=False, help="run slow tests"
)
def pytest_configure(config):
config.addinivalue_line("markers", "slow: mark test as slow (loads full model)")
def pytest_collection_modifyitems(config, items):
if config.getoption("--slow"):
return
skip_slow = __import__("pytest").mark.skip(reason="needs --slow option")
for item in items:
if "slow" in item.keywords:
item.add_marker(skip_slow)