Skip to content

Commit 9212c0e

Browse files
Ignore WASM code paths Codecov doesn't know about
1 parent ef70cbd commit 9212c0e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/zarr/core/sync.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ def sync(
138138
# coroutines differently. We integrate with the existing Pyodide WebLoop which
139139
# schedules tasks on the browser's event loop using setTimeout():
140140
# https://developer.mozilla.org/en-US/docs/Web/API/setTimeout
141-
if IS_WASM:
141+
if IS_WASM: # pragma: no cover
142+
# This code path is covered in the Pyodide/WASM CI job.
142143
current_loop = asyncio.get_running_loop()
143144
return current_loop.run_until_complete(coro)
144145

@@ -182,7 +183,8 @@ def _get_loop() -> asyncio.AbstractEventLoop:
182183
183184
The loop will be running on a separate thread.
184185
"""
185-
if IS_WASM:
186+
if IS_WASM: # pragma: no cover
187+
# This case is covered in the Pyodide/WASM CI job.
186188
raise RuntimeError(
187189
"Thread-based event loop not available in WASM environment. "
188190
"Use zarr.api.asynchronous or ensure sync() handles WASM case."

0 commit comments

Comments
 (0)