Skip to content

Commit 97905c6

Browse files
committed
test: testCheckCompatibility fixes for Bedework
Two bugs introduced in 632d529 caused testCheckCompatibility to run for ~8 minutes on servers with a search-cache delay (e.g. Bedework). Also cleaned out redundant entries from the bedework compatibility matrix, and added `save-load.event.recurrences.exception` as broken (hm, why did this pop up just now?) prompts: claude-sonnet-4-6: why is `pytest --last-failed` just hanging now? (I also tried asking how those duplicate lines got there in the first place) claude-sonnet-4-6: Skip doing more research, just delete those two lines claude-sonnet-4-6: `pytest --last-failed` still seems to hang. claude-sonnet-4-6: this problem has only been manifesting itself lately. What change caused it? claude-sonnet-4-6: Commit Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> test: cleaned up the bedework compatibility hints a bit
1 parent b34b616 commit 97905c6

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

caldav/compatibility_hints.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,15 +1056,13 @@ def dotted_feature_set_list(self, compact=False):
10561056
'auto-connect.url': {'basepath': '/ucaldav/'},
10571057
'save-load.journal': {'support': 'ungraceful'},
10581058
'save-load.todo.recurrences.thisandfuture': {'support': 'ungraceful'},
1059-
'save-load.event.recurrences.exception': False,
1059+
'save-load.event.recurrences.exception': {'support': 'unsupported'},
10601060
'search.time-range.alarm': {'support': 'unsupported'},
10611061
"freebusy-query": True,
10621062
"search.time-range.todo": False,
10631063
"search.text": False, ## sometimes ungraceful
1064-
"search.recurrences.includes-implicit": False,
1064+
"search.recurrences": False,
10651065
"sync-token": { "support": "fragile" },
1066-
"search.recurrences.expanded.event": False,
1067-
"search.recurrences.expanded.todo": False,
10681066
'search.comp-type': {'support': 'broken', 'behaviour': 'Server returns everything when searching for events and nothing when searching for todos'},
10691067
'search.comp-type.optional': {'support': 'ungraceful'},
10701068
'search.is-not-defined.dtend': False,

tests/test_caldav.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,15 @@ def testCheckCompatibility(self, request) -> None:
15151515
except Exception:
15161516
pass
15171517

1518+
## ServerQuirkChecker applies its own search-cache delay internally.
1519+
## setup_method may have already wrapped Calendar.search; temporarily
1520+
## expose the original so the checker doesn't double-delay each call.
1521+
saved_calendar_search = Calendar.search
1522+
had_underscore_search = hasattr(Calendar, "_search")
1523+
saved_calendar_underscore_search = getattr(Calendar, "_search", None)
1524+
if had_underscore_search:
1525+
Calendar.search = saved_calendar_underscore_search
1526+
15181527
try:
15191528
checker = ServerQuirkChecker(
15201529
self.caldav, debug_mode=debug_mode, extra_clients=extra_clients
@@ -1527,8 +1536,12 @@ def testCheckCompatibility(self, request) -> None:
15271536
ec.__exit__(None, None, None)
15281537
except Exception:
15291538
pass
1530-
checker.check_all()
1531-
checker.cleanup(force=False)
1539+
## Restore the state setup_method left so teardown_method works normally
1540+
Calendar.search = saved_calendar_search
1541+
if had_underscore_search:
1542+
Calendar._search = saved_calendar_underscore_search
1543+
elif hasattr(Calendar, "_search"):
1544+
delattr(Calendar, "_search")
15321545

15331546
## features observed and features expected
15341547
fo = checker.features_checked

0 commit comments

Comments
 (0)