示例#1
0
文件: test_leon.py 项目: hmcq6/pyleon
def test_double():
  assert leon.loads(leon.dumps(2.2222222)) == 2.2222222
  assert leon.loads(leon.dumps(-2.2222)) == -2.2222
示例#2
0
文件: test_leon.py 项目: hmcq6/pyleon
def test_array():
  obj = [{'a': 2.2, 'b': 500, 'c': 10000}, {'a': 2.5, 'b': 400, 'c': 100}, {'a': 2.6, 'b': 7.7, 'c': 10}]
  assert leon.loads(leon.dumps(obj)) == obj
示例#3
0
文件: test_leon.py 项目: hmcq6/pyleon
def test_object():
  obj = {'a': 1, 'b': 2}
  assert leon.loads(leon.dumps(obj)) == obj
示例#4
0
文件: test_leon.py 项目: hmcq6/pyleon
def test_float():
  assert leon.loads(leon.dumps(0.5)) == 0.5