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

ERF: Loosen pytest-seed and add a file for collection broken seeds #80

Open
wants to merge 52 commits into
base: master
Choose a base branch
from

Conversation

NiMlr
Copy link
Member

@NiMlr NiMlr commented Apr 20, 2020

The PR is an implementation of this suggestion.

@coveralls
Copy link

coveralls commented Apr 20, 2020

Coverage Status

Coverage increased (+0.06%) to 74.199% when pulling e352775 on NiMlr:master into 0111252 on mdp-toolkit:master.

@@ -0,0 +1,2 @@
# This file is a collection of pytest-seeds that led to at least one of the
# tests failing, and it provides a way to spot faulty functionality.
Copy link
Member

Choose a reason for hiding this comment

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

I would add a clear specification of how to store the seeds. So, we should first find a broken seed so the we can add an example here. Anyway, we should explain that a failing test can be reproduced like this:

pytest --seed==N mdp/test/test_XXX.py -k test_YYY

The values for N, XXX and YYY can be read out of the pytest report after a failed test run.

Here an example of failing seed (from: 664d688)

pytest --seed=2133340156 mdp/test/test_GSFANode.py -k test_basic_GSFA_edge_dict

(note that to get a failure for this specific test you need to comment out the @pytest.mark.skip decorator in the file)
So maybe it is enough if we just add the above line to this file. When we discover other failing seed/tests, we can add the lines to reproduce here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think extending the section on testing in the docs is a better place for this or should at least be considered additionally?

@otizonaizit
Copy link
Member

otizonaizit commented May 13, 2020 via email

@NiMlr NiMlr mentioned this pull request May 14, 2020
10 tasks
@NiMlr
Copy link
Member Author

NiMlr commented May 14, 2020

See the development guide entry that describes how to handle failed tests.

@Stewori Stewori mentioned this pull request Mar 17, 2022
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.

None yet

3 participants