diff --git a/tests/test_shm.py b/tests/test_shm.py index c183040c..2b7a382f 100644 --- a/tests/test_shm.py +++ b/tests/test_shm.py @@ -70,7 +70,10 @@ async def child_read_shm_list( ) -> None: # attach in child - shml = attach_shm_list(key=shm_key) + shml = attach_shm_list( + key=shm_key, + # dtype=str if use_str else float, + ) await ctx.started(shml.key) async with ctx.open_stream() as stream: @@ -92,7 +95,9 @@ async def child_read_shm_list( @pytest.mark.parametrize( - 'use_str', [False, True], + 'use_str', + [False, True], + ids=lambda i: f'use_str_values={i}', ) @pytest.mark.parametrize( 'frame_size', @@ -106,7 +111,7 @@ def test_parent_writer_child_reader( async def main(): async with tractor.open_nursery( - debug_mode=True, + # debug_mode=True, ) as an: portal = await an.start_actor( @@ -121,6 +126,7 @@ async def main(): shml = open_shm_list( key=key, size=seq_size, + dtype=str if use_str else float, readonly=False, ) @@ -143,7 +149,7 @@ async def main(): if use_str: val = str(val) - print(f'(parent): writing {val}') + # print(f'(parent): writing {val}') shml[i] = val # only on frame fills do we diff --git a/tractor/_shm.py b/tractor/_shm.py index 2ce148da..c4c17335 100644 --- a/tractor/_shm.py +++ b/tractor/_shm.py @@ -460,7 +460,6 @@ def flush(self) -> None: def open_shm_ndarray( - key: Optional[str] = None, size: int = int(2 ** 10), dtype: np.dtype | None = None, @@ -799,7 +798,6 @@ def open_shm_list( None: None, }[dtype] sequence = [default] * size - # sequence = [0.] * size shml = ShmList( sequence=sequence,