19 lines
691 B
Python
19 lines
691 B
Python
import pathlib
|
|
import sys
|
|
import typing
|
|
import unittest
|
|
|
|
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parent))
|
|
|
|
from review_passes import PASS_AGENTS, PASSES, ReviewedPass, REVIEWERS
|
|
|
|
|
|
class ReviewPasses(unittest.TestCase):
|
|
def test_names_each_pass_that_has_an_agent_once_in_the_literal_and_in_the_list(self):
|
|
self.assertEqual(list(REVIEWERS), list(typing.get_args(ReviewedPass)))
|
|
self.assertEqual(list(REVIEWERS), [name for name in PASSES if PASS_AGENTS[name]])
|
|
|
|
def test_names_each_agent_under_agents(self):
|
|
agents = pathlib.Path(__file__).resolve().parents[1] / "agents"
|
|
self.assertEqual(sorted(REVIEWERS.values()), sorted(path.stem for path in agents.glob("*.md")))
|