-
-
Notifications
You must be signed in to change notification settings - Fork 100
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
Tests are broken? #267
Comments
Relatedly, if we can get tests running I can help set up some automatic testing on PRs so the tests are less likely to get into this state again. |
I think we can add automatic tests to |
So, I'm devoting some time to figuring out whats going on with the tests. There are multiple tests that depend on Internet Explorer. The problems with this:
I think we should just drop the whole In general the tests are pretty poor quality by modern testing standards and mostly all need rewritten, but I think I can get a decent subset of them going without too much work. Unless someone objects I'm going to come up with an initial PR that contains a working test suite. It will drop maybe 25%-50% of the tests that don't work for various reasons and then we can have a discussion on the PR about if I made the right decisions. It seems like it'd be better to have a test suite that runs but doesn't cover everything than a test suite that doesn't run but hypothetically covers more. Any disagreements? |
The tests should me a mixture of querying known Windows API COM interfaces that have a known output and also be a self contained there where a COM interface gets set up with different test functions and a connection to that interface would be made passing data between them. Because of the scope of what comtypes does every single facet of it cannot be tested. |
@dmwyatt I totally agree. From my side I can do external testing in pywinauto repository that depends on comtypes. Fortunately we can use direct link to zipped branch of comtypes in pywinauto's requirements.txt for test purpose. So I can test pywinauto is not broken before comtypes' release. True unit tests must not rely on external services as much as possible. Maybe it's worth to mock some external things, though it may take time. Anyway guys I appreciate your efforts and will try to review all your PRs in a one week timeframe. |
I created the preliminary PR #271. |
Just a reminder that I noticed when looking at #96. The comtypes/comtypes/test/test_createwrappers.py Lines 26 to 27 in 7e90e54
The entire |
I'm trying to run the tests, but I can't. Is anyone able to run the tests successfully? I'm on Windows 10 using python 3.10 64 bit.
Here's some of the issues I'm having. They might belong in separate issues here or they might all be because the tests just don't run on python 3. Hopefully we can figure that out.
NameError: name 'basestring' is not defined
errors from the following line. I guess this is the same issue we talk about with long integers in PR Restore Python2.7 support without 2to3 fixer + timestamping fix #259.test_avmc.py
fails like so:test_leaks_1
,test_leaks_2
,test_leaks_3
intest_collections.py
take almost 7 minutes to complete on my very beefy machine andtest_leaks_2
fails withAssertionError: 688128 is not false : Leaks 688128 bytes
.There's a lot more failures but I'll get to posting them if we can make any progress on fixing these.
The text was updated successfully, but these errors were encountered: