19 lines
576 B
Python
19 lines
576 B
Python
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def test_checked_in_core_stub_exists():
|
|
assert (ROOT / "src" / "rpt" / "_core.pyi").exists()
|
|
|
|
|
|
def test_checked_in_core_stub_matches_generated_stub():
|
|
generated_stub = ROOT / "build" / "bindings" / "rpt" / "_core.pyi"
|
|
if not generated_stub.exists():
|
|
pytest.skip("Build-generated nanobind stub is unavailable.")
|
|
|
|
checked_in_stub = ROOT / "src" / "rpt" / "_core.pyi"
|
|
assert checked_in_stub.read_text(encoding="utf-8") == generated_stub.read_text(encoding="utf-8")
|