Skip to content

Commit d8938ed

Browse files
cliffhallclaude
andcommitted
test(time): mark the tests that pin known bugs
The characterization suites assert current behavior, right or wrong, so the SDK v2 port can prove it changed nothing. A test that pins wrong behavior now carries a uniform marker line directly above it: # KNOWN BUG #<issue>: pins current (wrong) behavior; the fix changes this assertion. # KNOWN BUG (no issue): <what's wrong>; the fix changes this assertion. so `git grep "KNOWN BUG"` lists exactly the bug-pinning tests. Pins of current design that feature requests want changed (#2853, #3201) are not marked. Comments only; no assertion or test logic changes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 003618a commit d8938ed

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/time/tests/test_protocol.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def handler_error(message: str) -> dict[str, Any]:
120120
# ---------------------------------------------------------------------------
121121

122122

123+
# KNOWN BUG #360: pins current (wrong) behavior; the fix changes this assertion.
123124
async def test_initialize_reports_server_info_and_capabilities() -> None:
124125
async with serving("UTC") as session:
125126
init = wire(await session.initialize())
@@ -234,6 +235,7 @@ async def test_empty_local_timezone_override_is_treated_as_absent() -> None:
234235
assert result == {"tools": expected_tools("Africa/Cairo")}
235236

236237

238+
# KNOWN BUG (no issue): an invalid --local-timezone crashes serve() with a traceback instead of a clean error; the fix changes this assertion.
237239
async def test_invalid_local_timezone_fails_before_the_transport_opens() -> None:
238240
# An unknown `--local-timezone` raises out of `serve()` itself, before
239241
# stdio is opened: the process dies with a traceback instead of starting.
@@ -707,6 +709,7 @@ async def test_convert_time_anchors_to_today_in_the_source_timezone() -> None:
707709
assert result["target"]["datetime"] == "2024-01-02T00:00:00+00:00"
708710

709711

712+
# KNOWN BUG (no issue): a nonexistent (spring-forward) local time is converted as if valid, with no warning; the fix changes this assertion.
710713
async def test_convert_time_into_a_nonexistent_local_time() -> None:
711714
# 02:30 on 2024-03-10 does not exist in New York (clocks jump 02:00 ->
712715
# 03:00). With fold=0 zoneinfo uses the pre-transition offset (EST), so
@@ -808,6 +811,7 @@ async def test_convert_time_ignores_extra_arguments() -> None:
808811
assert result["target"]["timezone"] == "UTC"
809812

810813

814+
# KNOWN BUG (no issue): an empty source_timezone surfaces zoneinfo's raw message, unlike get_current_time's "Missing required argument"; the fix changes this assertion.
811815
@pytest.mark.parametrize(
812816
"arguments,expected",
813817
[

0 commit comments

Comments
 (0)