-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add support for coverage #775
base: main
Are you sure you want to change the base?
Conversation
I am investigating and re-running the failed jobs in the CI pipeline. Even before this PR, memory leaks would occasionally occur, but re-running the jobs would result in success, so I had assumed these were one-time glitches. This project employs various kinds of metaprogramming and is also related to threading. It will likely require thorough investigation. |
Why do you keep running the CI? There have been 111 attempts, and they all failed. |
In between my main work and other investigations, I was repeatedly re-running the failed jobs to see if they would pass. As you pointed out, there are clearly problems. One key observation is that while failures occur depending on whether third-party dependencies are included or based on the system’s bitness, at least one test run for each Python version has passed. This means that every configuration has the potential to pass — but also the potential to fail. We should continue investigating the root cause, but to prevent memory leaks and stabilize the tests, we may need to escalate this to |
The coverage measurement of the test codebase might be affecting the results. |
In the documentation, they recommend to include the coverage of the test. |
The previous suggestion was meant to verify whether test code coverage measurement affects memory release. I agree that test code should be included in the coverage measurement. However, we first need to determine what is actually affecting the results. Possibly, it’s the coverage measurement itself. |
Thank you for the verification commit. Since it fails no matter how many times I re-run it, it seems that test code coverage measurement is not the root cause of this issue. Since the comtypes/comtypes/test/TestComServer.py Lines 104 to 108 in f1e79a9
|
Generating a tuple might be the issue. comtypes/comtypes/test/test_comserver.py Lines 93 to 100 in f1e79a9
How about trying "1 + 2" instead? |
I confirmed that changing from The failing test in a job was the same as before: However, what concerns me even more is that a job where all tests passed on Python 3.12 takes 818.020s. In contrast, a job where all tests passed on Python 3.11 only took 83.091s, which means the execution time has increased nearly tenfold. Looking at a canceled job on Python 3.12, I noticed that As mentioned in #524 (comment), the wrapper module for Currently, the latest version (7.6.10) of |
4476a34
to
f2d70dc
Compare
f2d70dc
to
6e405dd
Compare
I reported the Python 3.12 issue to |
These issues might be related: |
I opened this PR as a draft because I still haven't implement everthing said in #772.
Also, now, to run the tests, I use
coverage run -m unittest discover -v -s comtypes\test -t comtypes\test
instead ofpython -m unittest discover -v -s ./comtypes/test -t comtypes\test
, buttest_eval
consistently fails on Python 3.10 with a large memory leaks:Have you an idea why it happen?
We might be hitting a element from Things that don’t work.