Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series: Test is not testing for zero length series #1725

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Conversation

kotp
Copy link
Member

@kotp kotp commented Oct 31, 2024

This test now raises if the series is 0 instead of of the slice slice
size being larger than the series.

This allows one to raise on normalization of user input, the series
given, rather than incidentally having the slice size of 1 be larger
than the series size from a zero length string.

The example solution is updated to raise specifically for a zero length
series, rather than the incidental raising when slices are asked for.

@kotp kotp self-assigned this Oct 31, 2024
@kotp kotp requested a review from a team October 31, 2024 17:21
Copy link
Contributor

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@kotp kotp force-pushed the series_test_update branch from c07f118 to e986d31 Compare October 31, 2024 17:23
This test now raises if the series is 0 instead of of the slice slice
size being larger than the series.

This allows one to raise on normalization of user input, the series
given, rather than incidentally having the slice size of 1 be larger
than the series size from a zero length string.

The example solution is updated to raise specifically for a zero length
series, rather than the incidental raising when slices are asked for.

Note: This should not invalidate current solutions, while allowing
solutions that raise in `initialize` for the reason that the series is 0
length will now pass:

No need to test current solutions:

[no important files changed]
@kotp kotp force-pushed the series_test_update branch from e986d31 to 1dcd462 Compare October 31, 2024 17:34
@kotp kotp merged commit 42875af into main Oct 31, 2024
3 checks passed
@kotp kotp deleted the series_test_update branch October 31, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants