-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Retry failed dummyserver tests once #1718
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1718 +/- ##
=======================================
Coverage 99.65% 99.65%
=======================================
Files 22 22
Lines 2006 2006
=======================================
Hits 1999 1999
Misses 7 7 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one question.
from urllib3 import HTTPConnectionPool | ||
from dummyserver.testcase import SocketDummyServerTestCase | ||
|
||
# Retry failed tests | ||
pytestmark = pytest.mark.flaky |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've never seen this construction before, where is it documented? Must it be named pytestmark
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes: http://doc.pytest.org/en/latest/example/markers.html#marking-whole-classes-or-modules
I agree that it's quite obscure, which is why I added the comment. But it's way more convenient than marking every class or every test. Another option is do this for all tests, not only dummyserver tests: we could simply use a command-line option then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today I learned! This looks good ready to go then. :)
Closes #1595