Skip to content

Commit 2b08a91

Browse files
committed
Run tracemalloc tests sequentially
1 parent d2876cd commit 2b08a91

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎test/test_except.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import gc
55
import tracemalloc
66

7-
from pytest import raises
7+
from pytest import mark, raises
88

99
from msgpack import ExtType, FormatError, OutOfData, StackError, Unpacker, packb, unpackb
1010

@@ -103,6 +103,7 @@ def test_invalidvalue():
103103
unpacker.skip()
104104

105105

106+
@mark.thread_unsafe(reason="tracemalloc changes process-wide state and measures all threads")
106107
def test_no_memory_leak_on_nested_invalid_tag() -> None:
107108
"""Regression test: unpacking nested arrays containing an invalid tag must not leak objects."""
108109

‎test/test_limits.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ def test_pairs_preallocation_boundary(size):
153153

154154

155155
@pytest.mark.parametrize("kind", ["list", "tuple", "pairs"])
156+
@pytest.mark.thread_unsafe(reason="tracemalloc changes process-wide state and measures all threads")
156157
def test_nested_headers_preallocation(kind):
157158
packer = Packer()
158159
header = (

0 commit comments

Comments
 (0)