B VXY@sTddlZddlmZddlmZmZddlZddlm Z m Z m Z GdddeZ dS)N)TestCase) long_type text_type)NaNPosInfNegInfc@s4eZdZddZddZddZddZd d Zd S) TestFloatcCsPx(ttfD]}|tt||q Wttt}|d||kdS)Nr)rr assertEqualjsonloadsdumpsrZ assertTrue)selfinfnanrN/opt/alt/python37/lib64/python3.7/site-packages/simplejson/tests/test_float.pytest_degenerates_allowsz TestFloat.test_degenerates_allowc Cs4x.tttfD] }|ttj|dddq WdS)NT)Z ignore_nan)rrrr r r r )r frrrtest_degenerates_ignoresz!TestFloat.test_degenerates_ignorecCs,x&tttfD]}|jttj|ddq WdS)NF)Z allow_nan)rrrZ assertRaises ValueErrorr r )r rrrrtest_degenerates_denyszTestFloat.test_degenerates_denyc CstxndtjtjdtjddgD]N}|tt|||tt|||ttt||qWdS)NgAdig@)mathpir floatr r r r)r numrrr test_floatss zTestFloat.test_floatsc Cs~xxdtdddgD]d}|t|t||tt|||tt|||ttt||qWdS)Nll)rr r r strintr r)r rrrr test_intss zTestFloat.test_intsN)__name__ __module__ __qualname__rrrrr rrrrrs r) rZunittestrZsimplejson.compatrrZ simplejsonr Zsimplejson.decoderrrrrrrrrs