18 lines
621 B
Python
18 lines
621 B
Python
import subprocess
|
|
import sys
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
class GeneratedDocsTests(unittest.TestCase):
|
|
def test_ops_threshold_doc_is_up_to_date(self):
|
|
root = Path(__file__).resolve().parents[1]
|
|
before = (root / "docs" / "ops-thresholds.generated.md").read_text(encoding="utf-8")
|
|
subprocess.run([sys.executable, "scripts/generate_ops_docs.py"], cwd=root, check=True, capture_output=True, text=True)
|
|
after = (root / "docs" / "ops-thresholds.generated.md").read_text(encoding="utf-8")
|
|
self.assertEqual(after, before)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|