Skip to content

Commit 74cfaed

Browse files
test_json: fix reentrant JSONDecodeError test
1 parent 4257cdc commit 74cfaed

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_json/test_fail.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from test.test_json import PyTest, CTest
2+
from test import support
23
import json
34
import sys
45

@@ -267,6 +268,8 @@ def __call__(self, *args, **kwargs):
267268
self.assertEqual(sys.getrefcount(hook), 3)
268269
del hook
269270

271+
support.gc_collect()
272+
270273
with self.assertRaises(TypeError):
271274
json.loads('"\\uZZZZ"')
272275
finally:

0 commit comments

Comments
 (0)