Skip to content

Commit ca9d027

Browse files
authored
test: allow coverage data lock in blockbuster (#1828)
1 parent 0b697b7 commit ca9d027

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎tests/conftest.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ def blockbuster(
7171
yield None
7272
return
7373
with blockbuster_ctx() as bb:
74+
# coverage's C tracer acquires its data lock from whatever frame
75+
# is running when tracing starts on a new thread, which can be an
76+
# event-loop callback and is not a blocking call zeroconf makes.
77+
for func in ("threading.Lock.acquire", "threading.Lock.acquire_lock"):
78+
bb.functions[func].can_block_in("coverage/collector.py", "lock_data")
7479
yield bb
7580

7681

0 commit comments

Comments
 (0)