Skip to content

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Apr 7, 2025

I was doing a few readability changes when debugging a failing test for #2502. But kept finding more and more to cleanup. So here it is all at once:

  • Simplified __file__-related code
  • Removed unused GenerateAndRunOldStyle
  • Moved imports that don't need to be lazy to top of file
  • Remove unused imports
  • Use f-strings in favor of % printf-style format
  • Use True insteadof 1 for boolean True
  • Added annotations to help with IntelliSense
  • Simplified import_failures to only contain the error instead of type + error instance
    • Also use the error directly instead of calling sys.exc_info()
  • Printing once with a multiline string instead of printing multiple times
  • Fixed make_test_suite not using the test_level parameter
  • Fixed that test level 0 was a valid argument
  • Wrap all lines at 88 characters
  • Add an error message if multiple test level arguments are passed, rather than taking the last one.
  • Add level 4 to usage string

Also done in other PRs (so merging those first will reduce changes here):

Given lots of tests don't run on the CI. This should be run locally.

Argument parsing behaviour change:
image

@Avasam Avasam force-pushed the cleanup-com.win32com.test.testall branch from 3eb60aa to 165c73a Compare April 7, 2025 21:02
@Avasam Avasam force-pushed the cleanup-com.win32com.test.testall branch from 165c73a to c1efe12 Compare April 7, 2025 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant