2018-11-12 15:24:59 +00:00
|
|
|
import pytest
|
2021-04-01 23:03:49 +00:00
|
|
|
from pyo3_pytests.dict_iter import DictSize
|
2018-11-13 02:50:13 +00:00
|
|
|
|
2019-09-05 23:16:09 +00:00
|
|
|
|
|
|
|
@pytest.mark.parametrize("size", [64, 128, 256])
|
2018-11-12 15:24:59 +00:00
|
|
|
def test_size(size):
|
|
|
|
d = {}
|
2018-11-12 15:53:06 +00:00
|
|
|
for i in range(size):
|
2018-11-12 15:24:59 +00:00
|
|
|
d[i] = str(i)
|
|
|
|
assert DictSize(len(d)).iter_dict(d) == size
|