mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-08-17 16:37:30 +02:00
36 lines
873 B
Python
36 lines
873 B
Python
"""Contracts for every documented lazy package export."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import pytest
|
|
|
|
import obliteratus
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"name",
|
|
[
|
|
"AbliterationPipeline",
|
|
"InformedAbliterationPipeline",
|
|
"save_contribution",
|
|
"load_contributions",
|
|
"aggregate_results",
|
|
"TourneyRunner",
|
|
"TourneyResult",
|
|
"get_adaptive_recommendation",
|
|
"AdaptiveRecommendation",
|
|
"RemoteRunner",
|
|
"RemoteConfig",
|
|
"Watchtower",
|
|
"get_watchtower",
|
|
"AutoObliterator",
|
|
],
|
|
)
|
|
def test_documented_lazy_export_resolves(name):
|
|
assert getattr(obliteratus, name) is not None
|
|
|
|
|
|
def test_unknown_lazy_export_raises_attribute_error():
|
|
with pytest.raises(AttributeError, match="has no attribute 'not_an_export'"):
|
|
getattr(obliteratus, "not_an_export")
|