Fix sometime failing test#780
Merged
Merged
Conversation
The test assumed that the shuffled order of the list would be X because it assumed no other calls to random took place. Maybe some recent changes added a call to `random`, but the test fails on my ubuntu machine when `make eunit` is run. This change calls `seed` in the test to ensure that "determinsitic random" behaviour occurs for the test.
gwelr
reviewed
Mar 22, 2018
gwelr
left a comment
There was a problem hiding this comment.
As discussed, if you method is list_shuffle, the only valid test would be to prove it is correctly shuffle each time. This test try to prove the opposite. I would remove this test. If you absolutly need a test, run twice the list_shuffle call with the same In and make sure that Out1 and Out2 are different.
Contributor
Author
|
Yeah, I think since running it twice is only probably going to pass. It's a bad test. To copy Goldblum in JP: I was so preoccupied with whether or not I could fix it, I didn’t stop to think if I should. |
gwelr
approved these changes
Mar 22, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test assumed that the shuffled order of the list would
be X because it assumed no other calls to random took place.
Maybe some recent changes added a call to
random, but thetest fails on my ubuntu machine when
make eunitis run.This change calls
seedin the test to ensure that "determinsitic random"behaviour occurs for the test.