Skip to content

make test less flaky - #999

Merged
dwhswenson merged 1 commit into
openpathsampling:masterfrom
sroet:make_test_less_flaky
Apr 6, 2021
Merged

make test less flaky#999
dwhswenson merged 1 commit into
openpathsampling:masterfrom
sroet:make_test_less_flaky

Conversation

@sroet

@sroet sroet commented Apr 6, 2021

Copy link
Copy Markdown
Member

This week my CI failed with:

=================================== FAILURES ===================================
______________________ TestGaussianBiasSelector.test_pick ______________________

self = <openpathsampling.tests.test_shooting.TestGaussianBiasSelector object at 0x7fac57d4fc10>

    def test_pick(self):
        picks = [self.sel.pick(self.mytraj) for _ in range(100)]
        pick_counter = collections.Counter(picks)
        assert set(pick_counter.keys()) == set(range(len(self.mytraj)))
        # final test: 99.5 should happen more than 32.4
>       assert pick_counter[2] > pick_counter[0]
E       assert 13 > 18

openpathsampling/tests/test_shooting.py:70: AssertionError

(first mentioned in #998) from the comments on #998, this test should just be made less flaky.

timing for this test file goes from 1.06 s to 1.10 s with this change

@codecov

codecov Bot commented Apr 6, 2021

Copy link
Copy Markdown

Codecov Report

Merging #999 (7e81d0b) into master (5f86032) will decrease coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #999      +/-   ##
==========================================
- Coverage   80.62%   80.61%   -0.01%     
==========================================
  Files         138      138              
  Lines       14695    14695              
==========================================
- Hits        11848    11847       -1     
- Misses       2847     2848       +1     
Impacted Files Coverage Δ
openpathsampling/netcdfplus/cache.py 61.18% <0.00%> (-0.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f86032...7e81d0b. Read the comment docs.

@dwhswenson dwhswenson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dwhswenson
dwhswenson merged commit 523de5f into openpathsampling:master Apr 6, 2021
@sroet
sroet deleted the make_test_less_flaky branch April 7, 2021 10:35
@dwhswenson dwhswenson mentioned this pull request Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants