diff --git a/test/test_except.py b/test/test_except.py index 1e9c0045..57bc4280 100644 --- a/test/test_except.py +++ b/test/test_except.py @@ -4,7 +4,7 @@ import gc import tracemalloc -from pytest import raises +from pytest import mark, raises from msgpack import ExtType, FormatError, OutOfData, StackError, Unpacker, packb, unpackb @@ -103,6 +103,7 @@ def test_invalidvalue(): unpacker.skip() +@mark.thread_unsafe(reason="tracemalloc changes process-wide state and measures all threads") def test_no_memory_leak_on_nested_invalid_tag() -> None: """Regression test: unpacking nested arrays containing an invalid tag must not leak objects.""" diff --git a/test/test_limits.py b/test/test_limits.py index ae6503da..6ba73ce3 100644 --- a/test/test_limits.py +++ b/test/test_limits.py @@ -153,6 +153,7 @@ def test_pairs_preallocation_boundary(size): @pytest.mark.parametrize("kind", ["list", "tuple", "pairs"]) +@pytest.mark.thread_unsafe(reason="tracemalloc changes process-wide state and measures all threads") def test_nested_headers_preallocation(kind): packer = Packer() header = (