MCPcopy Create free account
hub / github.com/simplejson/simplejson / test_dictrecursion

Method test_dictrecursion

simplejson/tests/test_recursion.py:44–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

42 json.dumps(x)
43
44 def test_dictrecursion(self):
45 x = {}
46 x["test"] = x
47 try:
48 json.dumps(x)
49 except ValueError:
50 pass
51 else:
52 self.fail("didn't raise ValueError on dict recursion")
53 x = {}
54 y = {"a": x, "b": x}
55 # ensure that the marker is cleared
56 json.dumps(y)
57
58 def test_defaultrecursion(self):
59 enc = RecursiveJSONEncoder()

Callers

nothing calls this directly

Calls 1

dumpsMethod · 0.80

Tested by

no test coverage detected