File: test_reentrant.py

package info (click to toggle)
python-orjson 3.10.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,180 kB
  • sloc: ansic: 11,270; python: 6,658; sh: 135; makefile: 9
file content (16 lines) | stat: -rw-r--r-- 210 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import orjson


class C:
    c: "C"

    def __del__(self):
        orjson.loads('"' + "a" * 10000 + '"')


def test_reentrant():
    c = C()
    c.c = c
    del c

    orjson.loads("[" + "[]," * 1000 + "[]]")