Skip to content

Repeatable tests - #3

Open
wconrad wants to merge 2 commits into
awakia:masterfrom
wconrad:repeatable-tests
Open

Repeatable tests#3
wconrad wants to merge 2 commits into
awakia:masterfrom
wconrad:repeatable-tests

Conversation

@wconrad

Copy link
Copy Markdown

Cause tests to be repeatable for all MRI versions from 2.0 through 2.4.

  • Monkey-patch built-sorts to force them to be unstable in all Rubies.
    Some rubies (such as MRI >= 2.2) have stable sorts, which can cause
    the tests to pass erroneously. See
    https://stackoverflow.com/a/44486562/238886 for more about sort
    stability in Ruby

  • Set the random number seed in order to make tests repeatable. Since
    the tests sort relatively short arrays, random chance would
    sometimes cause erroneous test failures.

  • Some tests checked that Ruby's built-in sort is unstable. Those
    checks were moved into their own sections and expanded. Now every
    Ruby built-in sort method is tested for to ensure that it is
    unstable.

* Monkey-patch built-sorts to force them to be unstable in all Rubies.
Some rubies (such as MRI >= 2.2) have stable sorts, which can cause
the tests to pass erroneously. See
https://stackoverflow.com/a/44486562/238886 for more about sort
stability in Ruby
* Set the random number seed in order to make tests repeatable. Since
the tests sort relatively short arrays, random chance would
sometimes cause erroneous test failures.
* Some tests checked that Ruby's built-in sort is unstable. Those
checks were moved into their own sections and expanded. Now every
Ruby built-in sort method is tested for to ensure that it is
unstable.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-6.6%) to 93.396% when pulling 18cc086 on wconrad:repeatable-tests into dca16d9 on awakia:master.

Sign up for freeto 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

@wconrad@coveralls