GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — gh-120417: Add #noqa: F401 to tests by vstinner · Pull Request #120627 · python/cpython Conversation
|
| # In case _socket fails to build, make this test fail more gracefully | ||
| # than an AttributeError somewhere deep in concurrent.futures, email | ||
| # or unittest. | ||
| import _socket | ||
| import _socket # noqa: F401 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Would not using import_module() be better?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The intent is to get an error if the module is missing, not to skip the test.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # and it can function. | ||
| from multiprocessing.util import _cleanup_tests as multiprocessing_cleanup_tests | ||
| from concurrent.futures import ProcessPoolExecutor | ||
| from concurrent.futures import ProcessPoolExecutor # noqa: F401 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why ProcessPoolExecutor is needed?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's explained in the comment, 2 lines above. It's a check to define _have_multiprocessing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # deterministic. | ||
|
|
||
| from test.support import sortdict | ||
| from test.support import sortdict # noqa: F401 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Why sortdict is needed?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It's used in doctests.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ignore linter "imported but unused" warnings in tests when the linter doesn't understand why the import is important.
|
PR rebased to squash changes and fix merge conflicts. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Ignore linter "imported but unused" warnings in tests when the linter doesn't understand how the import is used.
Ignore linter "imported but unused" warnings in tests when the linter doesn't understand how the import is used.
Ignore linter "imported but unused" warnings in tests when the linter doesn't understand how the import is used.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.