-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Testing: run Coverage report only on CircleCI #10611
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
Take a look at this example: diff --git a/readthedocs/rtd_tests/tests/test_profile_views.py b/readthedocs/rtd_tests/tests/test_profile_views.py
index 42298cde2..fb99c597f 100644
--- a/readthedocs/rtd_tests/tests/test_profile_views.py
+++ b/readthedocs/rtd_tests/tests/test_profile_views.py
@@ -37,6 +37,7 @@ class ProfileViewsTest(TestCase):
)
self.assertTrue(resp.status_code, 200)
+ import pdb; pdb.set_trace()
self.user.refresh_from_db()
self.user.profile.refresh_from_db()
self.assertEqual(self.user.first_name, 'Read') Running the tests using coverageWhen it stops, I'm inside
Running tests without using coverage (this PR)I'm stopped exactly where I put the
|
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'm -1 on removing our coverage. We should use it more instead of removing it.
Conditionally running coverage could be supported with an env var or similar {env:COVERAGEOFF:--cov-report=xml...}
.
I like the idea of using an env variable to decide whether or not run it. I will update this PR to run it by default only on CircleCI |
1e98dc1
to
cdd0c24
Compare
I've been hitting an issue while debugging test cases that it doesn't stop exactly where I put the breakpoint. This has been pretty annoying since I'm in the middle of an inner function and I have to do multiple steps forward to find the exact place where I put my breakpoint. Today I found this problem is due to an incompatibility of `pytest-cov` and the debuggers: https://pytest-cov.readthedocs.io/en/latest/debuggers.html.
cdd0c24
to
a4f7ff0
Compare
I've been hitting an issue while debugging test cases that it doesn't stop exactly where I put the breakpoint. This has been pretty annoying since I'm in the middle of an inner function and I have to do multiple steps forward to find the exact place where I put my breakpoint.
Today I found this problem is due to an incompatibility of
pytest-cov
and the debuggers: https://pytest-cov.readthedocs.io/en/latest/debuggers.html.