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

youknowone

fix #93814

Automerge-Triggered-By: GH:rhettinger

This is safe, but not tested

@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.

@rhettinger

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.

rhettinger

@miss-islington

Status check is done, and it's a success ✅ .