Sorry, should have looked closer. This test is executed in Python, not
Cython. It works for me because other generator tests are being executed
before it and (intentionally) "leak" the global patch of the collections
module. When the tests are being executed in parallel or out of order, and
this is the first generator test, it can easily fail.
I removed this test part. It's already included in other tests, so this one
was just misplaced. Thanks for finding it.
Stefan