Skip to content

Commit b7bccd2

Browse files
Merge pull request #22 from Chinchill-AI/fix/fixture-xfails
fix: resolve all xfail fixture tests
2 parents e0ba3b2 + 2b5c26b commit b7bccd2

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/chat_sdk/adapters/google_chat/adapter.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2496,6 +2496,8 @@ def _normalize_bot_mentions(self, message: dict[str, Any]) -> str:
24962496
start_index = annotation.get("startIndex")
24972497
length = annotation.get("length")
24982498
if start_index is not None and length is not None:
2499+
start_index = int(start_index)
2500+
length = int(length)
24992501
mention_text = text[start_index : start_index + length]
25002502
text = text[:start_index] + f"@{self._user_name}" + text[start_index + length :]
25012503
self._logger.debug(

tests/test_fixture_replay.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,6 @@ async def test_gchat_mention_fixture(self):
425425
# GChat text is "@Chat SDK Demo hello" -> should contain "hello"
426426
assert "hello" in message.text.lower()
427427

428-
@pytest.mark.xfail(
429-
reason="channel/gchat.json has float startIndex (0.0) -- adapter needs int coercion",
430-
strict=False,
431-
)
432428
async def test_gchat_channel_fixture(self):
433429
"""channel/gchat.json mention should parse correctly."""
434430
fixture = load_fixture("channel/gchat.json")

0 commit comments

Comments
 (0)