Update ellens-alien-game test to prevent returning an empty list from the factory#4001
Update ellens-alien-game test to prevent returning an empty list from the factory#4001alexbird-hunterindustries wants to merge 1 commit intoexercism:mainfrom
Conversation
… the factory Before this change, you can pass the tests for `new_aliens_collection` by returning an empty list. After this change, the returned list must have the same length as the input list (so you create the same number of Aliens as the input asks for).
|
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. For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
|
Hello. Thanks for opening a PR on Exercism 🙂 We ask that all changes to Exercism are discussed on our Community Forum before being opened on GitHub. To enforce this, we automatically close all PRs that are submitted. That doesn't mean your PR is rejected but that we want the initial discussion about it to happen on our forum where a wide range of key contributors across the Exercism ecosystem can weigh in. You can use this link to copy this into a new topic on the forum. If we decide the PR is appropriate, we'll reopen it and continue with it, so please don't delete your local branch. If you're interested in learning more about this auto-responder, please read this blog post. Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it. |
I recognize that community contributions are not being accepted, and expect this PR to be automatically closed (as the docs say it will be)
I'm publishing it anyway so I have something to link to in the community thread
Before this change, you can pass the tests for
new_aliens_collectionby returning an empty list. After this change, the returned list must have the same length as the input list (so you create the same number of Aliens as the input asks for).Here is a sample solution that passes all the tests (but incorrectly returns an empty list from the factory method)
I would have expected a test failure, but got none (all tests passing).
After this change, the above code causes one test to fail:
After this change, as expected, when the
new_aliens_collectionmethod is implemented, the tests pass