Skip to content

Conversation

@junkmd
Copy link
Collaborator

@junkmd junkmd commented Dec 7, 2024

The requires and is_resource_enabled functions found in the tests were only meaningful when using the test command in setup.py.

Currently, unit tests can be executed by: unittest discover -v -s ./comtypes/test -t comtypes\test.

In most cases, requires and is_resource_enabled are effectively dead code.
Therefore, they will be removed here and replaced with the standard skipping mechanisms provided by unittest if necessary.

If displaying missing resources or handling complex skip conditions becomes necessary, we can consider introducing unittest plugins or adopting pytest. IMO, such measures would be excessive at this stage.

The removal of these function definitions from test/__init__.py would also affect setup.py, so those changes are not included in the scope of this PR.

@junkmd junkmd added the tests enhance or fix tests label Dec 7, 2024
@junkmd junkmd added this to the 1.4.9 milestone Dec 7, 2024
junkmd added a commit to junkmd/pywinauto that referenced this pull request Dec 7, 2024
@junkmd junkmd merged commit c19790c into enthought:main Dec 7, 2024
49 checks passed
@junkmd junkmd deleted the remove_is_resource_enabled_and_requires_from_tests branch December 7, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests enhance or fix tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant