Make use of yield in __iter__
This commit is contained in:
@@ -181,7 +181,7 @@ def test_add(
|
||||
])
|
||||
def test_iter(init_values: List[Union[bool, List[bool], bytes, str, Bitstream]]):
|
||||
bitstream = Bitstream(*init_values)
|
||||
assert len(iter(bitstream)) == len(bitstream)
|
||||
assert len(list(bitstream)) == len(bitstream)
|
||||
for index, bit in enumerate(bitstream):
|
||||
assert bit == bitstream[index]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user