Readers ashby to lever hand on the host's words; their word tables move to app/prep/hosts
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a66aac95cf
commit
6c7ce1090d
37 files changed
+504
-171
No files matched your search
@@ -24,10 +24,16 @@ from plugins.readers._shared import ( # noqa: E402
|
||||
#: The module-level names a reader keeps its employment words in.
|
||||
_TABLES = ("_EMPLOYMENT", "_CONTRACT", "_SCHEDULE")
|
||||
|
||||
#: The readers of `ashby` to `lever` hand on the host's words; their tables
|
||||
#: moved to `app/prep/hosts`.
|
||||
_RAW = {"ashby", "bamboohr", "deel", "eightfold", "gem", "greenhouse", "hibob", "hrmanager",
|
||||
"jibe", "jobylon", "lever"}
|
||||
|
||||
|
||||
def test_every_employment_table_maps_into_the_shared_vocabulary() -> None:
|
||||
found = 0
|
||||
for name, module in readers.READERS.items():
|
||||
assert not _RAW & {name} or not any(hasattr(module, t) for t in _TABLES), name
|
||||
for table_name in _TABLES:
|
||||
table = getattr(module, table_name, None)
|
||||
if table is None:
|
||||
@@ -36,7 +42,7 @@ def test_every_employment_table_maps_into_the_shared_vocabulary() -> None:
|
||||
values = table.values() if isinstance(table, dict) else [v for _k, v in table]
|
||||
# "" is a known word that names no employment ("permanent").
|
||||
assert set(values) <= {*EMPLOYMENTS, ""}, (name, table_name)
|
||||
assert found >= 15
|
||||
assert found >= 5
|
||||
|
||||
|
||||
def test_the_vocabulary_is_the_documented_one() -> None:
|
||||
|
||||
Reference in new issue
Block a user