Skip to content

Commit 615f00f

Browse files
youknowdotcodex
andauthored
Fail slice fixture checks when reference comparisons disagree (#9746)
Preserve all slice diagnostics but raise instead of merely printing the failure count. Correct the expected and actual values in each diagnostic. Assisted-by: OpenAI Codex:version-unavailable Co-authored-by: Codex <[email protected]>
1 parent cca03a2 commit 615f00f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎extra_tests/snippets/builtin_slice.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ def test_all_slices():
191191
except AssertionError:
192192
failures.append(
193193
"start: {} ,stop: {}, step {}. Expected: {}, found: {}".format(
194-
s, e, t, lhs, slices_res[count]
194+
s, e, t, slices_res[count], lhs
195195
)
196196
)
197197
count += 1
198198

199199
if failures:
200200
for f in failures:
201201
print(f)
202-
print(len(failures), "slices failed")
202+
raise AssertionError(f"{len(failures)} slices failed")
203203

204204

205205
test_all_slices()

0 commit comments

Comments
 (0)