Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extra_tests/snippets/builtin_slice.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ def test_all_slices():
except AssertionError:
failures.append(
"start: {} ,stop: {}, step {}. Expected: {}, found: {}".format(
s, e, t, lhs, slices_res[count]
s, e, t, slices_res[count], lhs
)
)
count += 1

if failures:
for f in failures:
print(f)
print(len(failures), "slices failed")
raise AssertionError(f"{len(failures)} slices failed")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the existing snippet test logic

Replacing the summary print with raise changes the pass/fail logic of the existing test_all_slices(). Root AGENTS.md explicitly says “NEVER modify test assertions, test logic, or test data”; this restriction applies to snippet tests too. Preserve the existing function and add separate fail-on-mismatch coverage using the permitted new-test approach, or obtain an explicit policy exception before changing its logic.

AGENTS.md reference: AGENTS.md:L278-L278

Useful? React with 👍 / 👎.



test_all_slices()
Loading