Update the walk_modules_iter() doctest for Python 3.15.

This commit is contained in:
Andrey Rakhmatullin 2026-06-15 01:49:53 +05:00
parent e1370abf1c
commit 194d19d4a6
1 changed files with 2 additions and 2 deletions

View File

@ -99,10 +99,10 @@ def walk_modules_iter(path: str) -> Iterable[ModuleType]:
>>> list(walk_modules_iter('scrapy.utils'))
[<module 'scrapy.utils' from '...'>, ...]
>>> gen = walk_modules_iter('scrapy.utils.nonexistent') # error not raised until the generator is consumed
>>> list(gen)
>>> list(gen) # doctest: +ELLIPSIS
Traceback (most recent call last):
...
ModuleNotFoundError: No module named 'scrapy.utils.nonexistent'
ModuleNotFoundError: No module named 'scrapy.utils.nonexistent'...
"""
mod = import_module(path)