ponyorm / pony

Pony Object Relational Mapper
Apache License 2.0
3.63k stars 245 forks source link

test_json fails with sqlite 3.45 #704

Closed antonio-rojas closed 1 month ago

antonio-rojas commented 7 months ago

With sqlite 3.45, test_json fails with multiple errors like

ERROR: test_query_float (test_json.TestJson.test_query_float)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 2, in test_query_float
  File "/build/python-pony/src/pony-0.7.17/pony/orm/core.py", line 519, in new_func
    result = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/build/python-pony/src/pony-0.7.17/pony/orm/tests/test_json.py", line 91, in test_query_float
    self.assertAlmostEqual(val, 9.7)
  File "/usr/lib/python3.11/unittest/case.py", line 904, in assertAlmostEqual
    diff = abs(first - second)
               ~~~~~~^~~~~~~~
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
kozlovsky commented 1 month ago

Thanks for the reporting, it is fixed now.