Prep reads remote from a Danish or Swedish place line, and from a search role's title

The search providers stop mapping remote_word themselves (R2), so prep reads
the same words: in any role's place line after remote_of, and in the title of
a role from a search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
WolfandClaude Opus 5.5 committed 2026-09-30 11:23:34 +02:00
1 parent d04ceae7e0
commit 56fad284a6
4 files changed
+48 -6

No files matched your search

+20
View File
@@ -93,6 +93,26 @@ def test_remote_from_a_bool_a_word_the_place_line_then_a_place_marked_remote() -
"", TABLES) == "remote"
def test_a_line_in_danish_or_swedish_and_a_search_title_are_read() -> None:
assert words.remote("jobindex", None, (), "Nordhavn og mulighed for hjemmearbejde") \
== "hybrid"
assert words.remote("jobindex", None, (), "Aarhus, fuldt hjemmearbejde") == "remote"
assert words.remote("platsbanken", None, (), "Malmö, arbete på distans") == "remote"
assert words.remote("adzuna", None, (), "Berlin", title="Backend Developer - Remote") \
== "remote"
assert words.remote("adzuna", None, (), "Berlin", title="Backend Developer") == ""
def test_a_search_roles_title_counts_and_a_boards_does_not(store: Store) -> None:
store.upsert_role(item("1", title="Engineer (remote)", place="Berlin"))
store.upsert_role(item("2", title="Engineer (remote)", place="Berlin", host="jobindex",
provider="jobindex"))
with store.transaction() as conn:
conn.execute("UPDATE roles SET source = 'search' WHERE source_id = 'jobindex:2'")
prep.run(store, tables=TABLES)
assert (row(store, "1")["remote"], row(store, "2", "jobindex")["remote"]) == ("", "remote")
# ----------------------------------------------------------------- country
@pytest.fixture