File: test_float.py

package info (click to toggle)
pyamf 0.6.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,692 kB
  • sloc: python: 17,944; xml: 455; makefile: 116; sql: 38; java: 11; sh: 7
file content (6 lines) | stat: -rw-r--r-- 176 bytes parent folder | download
1
2
3
4
5
6
import simplejson
import math

def test_floats():
    for num in [1617161771.7650001, math.pi, math.pi**100, math.pi**-100]:
        assert float(simplejson.dumps(num)) == num