alchemy-mock icon indicating copy to clipboard operation
alchemy-mock copied to clipboard

Use chain.from_iterable in mocking.py

Open cool-RR opened this issue 5 years ago • 2 comments

This is a faster and more idiomatic way of using itertools.chain. Instead of computing all the items in the iterable and storing them in memory, they are computed one-by-one and never stored as a huge list. This can save on both runtime and memory space.

cool-RR avatar Jun 17 '20 11:06 cool-RR

Coverage Status

Coverage remained the same at 100.0% when pulling 3bbc0d45558a593eb27fcb24cb8295abfe5a0f0c on cool-RR:patch-1 into f8af8881b214e154131efe68bd2fd4083c84e066 on miki725:master.

coveralls avatar Jun 17 '20 11:06 coveralls

Hmm, I think that the CI failure is not related to my change.

cool-RR avatar Jun 17 '20 13:06 cool-RR