Readers oracle to workday and the providers 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
06eb929eaf
48 files changed
+460
-388
No files matched your search
@@ -0,0 +1,24 @@
|
||||
"""Pinpoint's word tables for prep: `workplace_type` and `employment_type`."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib
|
||||
|
||||
pinpoint = importlib.import_module("app.prep.hosts.pinpoint")
|
||||
|
||||
|
||||
def _match(code: str) -> str | None:
|
||||
"""The first entry of `MATCH` found in the lowercased code."""
|
||||
code = code.strip().lower()
|
||||
return next((value for fragment, value in pinpoint.MATCH if fragment in code), None)
|
||||
|
||||
|
||||
def test_workplace_types_read() -> None:
|
||||
assert pinpoint.REMOTE == {"onsite": "onsite", "on_site": "onsite", "hybrid": "hybrid",
|
||||
"remote": "remote"}
|
||||
|
||||
|
||||
def test_employment_types_read_by_their_fragments() -> None:
|
||||
assert [_match(w) for w in ("permanent_full_time", "fixed_term_full_time",
|
||||
"permanent_part_time", "internship", "something_new")] == [
|
||||
"full_time", "temporary", "part_time", "internship", None]
|
||||
Reference in new issue
Block a user