mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
gh-120417: Add #noqa: F401 to tests (#120627)
Ignore linter "imported but unused" warnings in tests when the linter doesn't understand how the import is used.
This commit is contained in:
parent
7e189aed64
commit
e9f4d80fa6
24 changed files with 43 additions and 41 deletions
|
@ -1239,7 +1239,8 @@ class PydocImportTest(PydocBaseTest):
|
|||
sys.path.insert(0, TESTFN)
|
||||
try:
|
||||
with self.assertRaisesRegex(ValueError, "ouch"):
|
||||
import test_error_package # Sanity check
|
||||
# Sanity check
|
||||
import test_error_package # noqa: F401
|
||||
|
||||
text = self.call_url_handler("search?key=test_error_package",
|
||||
"Pydoc: Search Results")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue