30 lines
1.3 KiB
Python
30 lines
1.3 KiB
Python
import unittest
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[3]
|
|
REFERENCE = ROOT / 'harness/agents/review/skills/gitea-code-review/references/native-review.md'
|
|
SKILL = ROOT / 'harness/agents/review/skills/gitea-code-review/SKILL.md'
|
|
CACHE = ROOT / 'harness/operations/repository-cache.md'
|
|
|
|
|
|
class NativeJournalDocumentationTests(unittest.TestCase):
|
|
def test_canonical_registry_and_legacy_policy_are_explicit(self):
|
|
for path in (REFERENCE, SKILL, CACHE):
|
|
text = path.read_text()
|
|
for token in ('harness/.runtime/native-review-journals',
|
|
'canonical_journal_path', 'register_legacy_journal',
|
|
'binding', 'read-only', 'cross-host'):
|
|
with self.subTest(path=str(path), token=token):
|
|
self.assertIn(token, text)
|
|
|
|
def test_no_caller_selected_journal_in_live_example(self):
|
|
text = REFERENCE.read_text()
|
|
self.assertNotIn('result = native_review.publish(plan, baseline, api, lease, journal_directory)', text)
|
|
self.assertIn('result = native_review.publish(plan, baseline, api, lease)', text)
|
|
self.assertIn('기존 journal을 자동 이동·삭제', text)
|
|
self.assertIn('pending', text)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|