Skip to content

Commit 98c803e

Browse files
Don't test ref count on "immortal" object
I can't trigger this problem on Linux, but the GitHiub actions MacOS build has it. There are probably more to find.
1 parent 38e95cf commit 98c803e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tests/test_basicio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ def test_MemIo(self):
227227
def test_ref_counts(self):
228228
# MemIo keeps a reference to the data buffer
229229
count = sys.getrefcount(self.data)
230+
if count > 1000000:
231+
# self.data is "immortal"
232+
return
230233
io = exiv2.ImageFactory.createIo(self.data)
231234
self.assertEqual(sys.getrefcount(self.data), count + 1)
232235
del io

0 commit comments

Comments
 (0)