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
@@ -5,11 +5,9 @@ No network: the fixture has the shape of Hugging Face's board, read on
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
if str(ROOT) not in sys.path:
|
||||
@@ -49,21 +47,15 @@ def test_every_location_of_a_role_is_a_place_once() -> None:
|
||||
assert [p["text"] for p in first["places"]] == ["Berlin, Germany", "Munich, Bavaria, Germany",
|
||||
"Paris, France"]
|
||||
assert first["location"] == "Berlin, Germany; Munich, Bavaria, Germany; Paris, France"
|
||||
assert first["country"] is None # DE and FR
|
||||
assert "country" not in first # prep derives it from the places
|
||||
assert [p["remote"] for p in first["places"]] == [False] * 3
|
||||
assert remote["places"] == [{"text": "France", "remote": True}]
|
||||
assert remote["country"] == "FR"
|
||||
# A list-less answer (the older shape) still gives its one place.
|
||||
assert oslo["places"] == [{"text": "Oslo, Norway", "remote": False}]
|
||||
assert oslo["country"] == "NO"
|
||||
|
||||
|
||||
def test_the_stated_hours_are_mapped_and_an_unknown_type_is_logged(
|
||||
caplog: pytest.LogCaptureFixture) -> None:
|
||||
with caplog.at_level(logging.DEBUG, logger=workable.__name__):
|
||||
rows = _rows()
|
||||
assert [r["employment"] for r in rows] == ["full_time", "part_time", None]
|
||||
assert [r.getMessage() for r in caplog.records] == ["workable: unknown type 'volunteer'"]
|
||||
def test_the_stated_hours_are_the_hosts_word() -> None:
|
||||
assert [r["employment"] for r in _rows()] == ["full", "part", "volunteer"]
|
||||
|
||||
|
||||
def test_the_shape_of_a_real_list_answer_is_read() -> None:
|
||||
|
||||
Reference in new issue
Block a user