gh-93814: Add infinite test for itertools.chain.from_iterable by youknowone · Pull Request #93815 · python/cpython
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
fix #93814
Automerge-Triggered-By: GH:rhettinger
Thanks for the PR, but I don't think it adds any value. There is nothing about the iterator protocol that differentiates between infinite iterators and partially consumed iterators. So, we're not increasing test coverage in any way.
Please see the comment on the GitHub issue.
After more thought, there may be some value to this test in that it checks that the input iterable is consumed lazily; otherwise, this test would never finish. There may be more economical ways to write this test, but the one proposed will suffice.