diff --git a/tests/test_journal_block_reports_its_position.py b/tests/test_journal_block_reports_its_position.py index ceef25d..aa0de7d 100644 --- a/tests/test_journal_block_reports_its_position.py +++ b/tests/test_journal_block_reports_its_position.py @@ -37,5 +37,4 @@ def test_a_heading_not_created_fails_instead_of_moving_the_blocks(monkeypatch, e assert result.stdout == "" error = json.loads(result.stderr) assert (error["reason"], error["method"]) == ("write_not_verified", "appendBlockInPage") - assert "Could not find or create" not in result.stderr assert double.tree("2026-01-05, Monday") == [("journal top", [])] diff --git a/tests/test_keep_block_ids.py b/tests/test_keep_block_ids.py index 04d2052..255f34f 100644 --- a/tests/test_keep_block_ids.py +++ b/tests/test_keep_block_ids.py @@ -183,7 +183,7 @@ def test_top_level_roots_keep_their_ids_too(self, tmp_path): assert result.exit_code == 0, result.output _, siblings, i, parent = api.graph.locate(VALID) assert parent is None and i == len(siblings) - 1 - assert "cannot preserve" not in result.output + assert "id:: propert" not in result.output class TestIdLinesAsLogseqReadsThem: diff --git a/tests/test_keep_ids_every_writer.py b/tests/test_keep_ids_every_writer.py index 265232d..08ef25f 100644 --- a/tests/test_keep_ids_every_writer.py +++ b/tests/test_keep_ids_every_writer.py @@ -141,7 +141,7 @@ def test_with_keep_ids_the_id_is_kept_even_at_top_level(self, name): assert _ids_asked_for(api) == [ID] page, _, _, parent = api.graph.locate(ID) assert parent is None - assert "cannot preserve" not in r.stderr + assert "id:: propert" not in r.stderr def test_an_id_that_already_exists_is_refused_before_any_write(self, name): api = _api(existing_ids=[ID]) diff --git a/tests/test_read_errors_are_not_empty.py b/tests/test_read_errors_are_not_empty.py index 4f72f47..28727c3 100644 --- a/tests/test_read_errors_are_not_empty.py +++ b/tests/test_read_errors_are_not_empty.py @@ -70,6 +70,19 @@ def test_get_page_stats_does_not_report_zero_inbound_links_after_an_error(): assert json.loads(result.stderr)["backlinks_unread"] == ["Alpha"] +def test_get_page_stats_reports_the_inbound_count_when_the_scan_can_read_every_page(): + """The twin of the test above, and what keeps its ``"inbound_count" not in`` + from going blind: were the field renamed, only a test that expects it + present would notice.""" + api = _api("nobody") # no page fails to read + api.get_page_linked_references.side_effect = RuntimeError("HTTP 500") # falls back to the scan + result = _run(api, "get-page-stats", "--page", "Alpha") + assert result.exit_code == 0, result.stderr + stats = json.loads(result.stdout) + assert stats["inbound_links"] == sorted([JOURNAL, "Beta"]) + assert stats["inbound_count"] == 2 + + @pytest.mark.parametrize("command", [ ["analyze-graph"], ["find-knowledge-gaps"],