Using my PR 7827, I saw that test_refleaks_in_decompressor___init__() of test_lzma leaks 100 handles on Windows.
Extract of the code:
@support.refcount_test
def test_refleaks_in_decompressor___init__(self):
gettotalrefcount = support.get_attribute(sys, 'gettotalrefcount')
lzd = LZMADecompressor()
refs_before = gettotalrefcount()
for i in range(100):
lzd.__init__()
self.assertAlmostEqual(gettotalrefcount() - refs_before, 0, delta=10)
The test comes from bpo-31787: commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5.