fix(e2e): skip chat history tests when read-only notebook has no turns (#155)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Test / Code Quality (push) Waiting to run
Test / Test (macos-latest, Python 3.10) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.11) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.12) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.13) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.14) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.10) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.11) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.12) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.13) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.14) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.10) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.11) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.12) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.13) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.14) (push) Blocked by required conditions
Some checks are pending
CodeQL / Analyze (push) Waiting to run
Test / Code Quality (push) Waiting to run
Test / Test (macos-latest, Python 3.10) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.11) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.12) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.13) (push) Blocked by required conditions
Test / Test (macos-latest, Python 3.14) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.10) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.11) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.12) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.13) (push) Blocked by required conditions
Test / Test (ubuntu-latest, Python 3.14) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.10) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.11) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.12) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.13) (push) Blocked by required conditions
Test / Test (windows-latest, Python 3.14) (push) Blocked by required conditions
The read-only test notebook may have a conversation ID but no actual chat turns, causing IndexError on empty turns_data. Skip gracefully with a descriptive message instead of crashing. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3ca046b6bc
commit
5323dd0679
1 changed files with 15 additions and 0 deletions
|
|
@ -197,6 +197,11 @@ class TestChatHistoryE2E:
|
|||
)
|
||||
|
||||
assert turns_data is not None
|
||||
if not turns_data:
|
||||
pytest.skip(
|
||||
"Read-only notebook has a conversation but no chat turns — "
|
||||
"cannot verify turn structure. Seed the notebook with chat messages to enable this test."
|
||||
)
|
||||
assert isinstance(turns_data[0], list)
|
||||
turns = turns_data[0]
|
||||
assert len(turns) >= 1
|
||||
|
|
@ -219,6 +224,11 @@ class TestChatHistoryE2E:
|
|||
)
|
||||
|
||||
assert turns_data is not None
|
||||
if not turns_data:
|
||||
pytest.skip(
|
||||
"Read-only notebook has a conversation but no chat turns — "
|
||||
"cannot verify question text. Seed the notebook with chat messages to enable this test."
|
||||
)
|
||||
turns = turns_data[0]
|
||||
question_turns = [t for t in turns if isinstance(t, list) and len(t) > 3 and t[2] == 1]
|
||||
assert question_turns, "No question turn found in response"
|
||||
|
|
@ -240,6 +250,11 @@ class TestChatHistoryE2E:
|
|||
)
|
||||
|
||||
assert turns_data is not None
|
||||
if not turns_data:
|
||||
pytest.skip(
|
||||
"Read-only notebook has a conversation but no chat turns — "
|
||||
"cannot verify answer text. Seed the notebook with chat messages to enable this test."
|
||||
)
|
||||
turns = turns_data[0]
|
||||
answer_turns = [t for t in turns if isinstance(t, list) and len(t) > 4 and t[2] == 2]
|
||||
assert answer_turns, "No answer turn found in response"
|
||||
|
|
|
|||
Loading…
Reference in a new issue