o \Փa@sTddlZddlmZddlmZmZddlZddlm Z m Z m Z GdddeZ dS)N)TestCase) long_type text_type)NaNPosInfNegInfc@s4eZdZddZddZddZddZd d Zd S) TestFloatcCsLttfD]}|tt||qttt}|d||kdS)Nr)rr assertEqualjsonloadsdumpsr assertTrue)selfinfnanr=/usr/lib/python3/dist-packages/simplejson/tests/test_float.pytest_degenerates_allows z TestFloat.test_degenerates_allowc Cs0tttfD]}|ttj|dddqdS)NT) ignore_nan)rrrr r r r rfrrrtest_degenerates_ignoresz!TestFloat.test_degenerates_ignorecCs(tttfD] }|jttj|ddqdS)NF) allow_nan)rrr assertRaises ValueErrorr r rrrrtest_degenerates_denyszTestFloat.test_degenerates_denyc CspdtjtjdtjddfD]'}|tt|||tt|||ttt||qdS)NgAdig@)mathpir floatr r r rrnumrrr test_floatss zTestFloat.test_floatsc CszdtdddfD]2}|t|t||tt|||tt|||ttt||qdS)Nll)rr r r strintr rr rrr test_intss zTestFloat.test_intsN)__name__ __module__ __qualname__rrrr"r&rrrrrs  r) runittestrsimplejson.compatrr simplejsonr simplejson.decoderrrrrrrrrs