From 1c214f40339f47dcf99a24c6c916c04b5d6f1272 Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 6 Oct 2026 17:31:36 -0600 Subject: [PATCH] tests: bookmark config import tests set up the app's shared context They read `successful_import`, which lives in the shared context that `async_client` attaches. They only passed when an earlier test in the same xdist worker had attached it; run first, all 13 failed. Co-Authored-By: Claude Opus 5.5 --- wrolpi/test/test_bookmarks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrolpi/test/test_bookmarks.py b/wrolpi/test/test_bookmarks.py index 83634105..26f427e4 100644 --- a/wrolpi/test/test_bookmarks.py +++ b/wrolpi/test/test_bookmarks.py @@ -175,7 +175,7 @@ def test_bookmarks_config_import(test_directory, test_wrolpi_config): ['not a node'], 'not a list', ]) -def test_bookmarks_config_import_rejects_bad_tree(test_directory, test_wrolpi_config, bookmarks): +async def test_bookmarks_config_import_rejects_bad_tree(async_client, test_directory, test_wrolpi_config, bookmarks): """A hand-edited file that the API would refuse is not imported, and is not overwritten.""" config_file = test_directory / 'config/bookmarks.yaml' config_file.parent.mkdir(exist_ok=True) @@ -195,7 +195,7 @@ def test_bookmarks_config_import_rejects_bad_tree(test_directory, test_wrolpi_co assert config_file.read_text() == original -def test_bookmarks_config_import_rejects_cycle(test_directory, test_wrolpi_config): +async def test_bookmarks_config_import_rejects_cycle(async_client, test_directory, test_wrolpi_config): """A YAML anchor can make a directory contain itself; walking that would never end.""" config_file = test_directory / 'config/bookmarks.yaml' config_file.parent.mkdir(exist_ok=True)