Django

Code

Ticket #6093 (new)

Opened 6 months ago

Last modified 6 months ago

a few Decimal/float serializers_regress tests failing with python 2.3 and postgresql_psycopg2 engine

Reported by: gwilson Assigned to: nobody
Component: Serialization Version: SVN
Keywords: Cc:
Triage Stage: Accepted Has patch: 0
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

Description

======================================================================
FAIL: test_json_serializer (regressiontests.serializers_regress.tests.SerializerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gdub/bzr/django/upstream/django/utils/functional.py", line 3, in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/home/gdub/bzr/django/upstream/tests/regressiontests/serializers_regress/tests.py", line 305, in serializerTest
    func[1](self, pk, klass, datum)
  File "/home/gdub/bzr/django/upstream/tests/regressiontests/serializers_regress/tests.py", line 74, in data_compare
    "Objects with PK=%d not equal; expected '%s' (%s), got '%s' (%s)" % (pk,data, type(data), instance.data, type(instance.data)))
  File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: Objects with PK=70 not equal; expected '12.345' (<class 'django.utils._decimal.Decimal'>), got '12.345' (<type 'float'>)

======================================================================
FAIL: test_python_serializer (regressiontests.serializers_regress.tests.SerializerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gdub/bzr/django/upstream/django/utils/functional.py", line 3, in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/home/gdub/bzr/django/upstream/tests/regressiontests/serializers_regress/tests.py", line 305, in serializerTest
    func[1](self, pk, klass, datum)
  File "/home/gdub/bzr/django/upstream/tests/regressiontests/serializers_regress/tests.py", line 74, in data_compare
    "Objects with PK=%d not equal; expected '%s' (%s), got '%s' (%s)" % (pk,data, type(data), instance.data, type(instance.data)))
  File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: Objects with PK=70 not equal; expected '12.345' (<class 'django.utils._decimal.Decimal'>), got '12.345' (<type 'float'>)

======================================================================
FAIL: test_xml_serializer (regressiontests.serializers_regress.tests.SerializerTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/gdub/bzr/django/upstream/django/utils/functional.py", line 3, in _curried
    return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
  File "/home/gdub/bzr/django/upstream/tests/regressiontests/serializers_regress/tests.py", line 305, in serializerTest
    func[1](self, pk, klass, datum)
  File "/home/gdub/bzr/django/upstream/tests/regressiontests/serializers_regress/tests.py", line 74, in data_compare
    "Objects with PK=%d not equal; expected '%s' (%s), got '%s' (%s)" % (pk,data, type(data), instance.data, type(instance.data)))
  File "/usr/lib/python2.3/unittest.py", line 302, in failUnlessEqual
    raise self.failureException, \
AssertionError: Objects with PK=70 not equal; expected '12.345' (<class 'django.utils._decimal.Decimal'>), got '12.345' (<type 'float'>)

----------------------------------------------------------------------
Ran 8 tests in 24.318s

FAILED (failures=3)

Attachments

Change History

12/01/07 19:44:56 changed by Simon G <dev@simon.net.nz>

  • needs_better_patch changed.
  • stage changed from Unreviewed to Accepted.
  • needs_tests changed.
  • needs_docs changed.

Add/Change #6093 (a few Decimal/float serializers_regress tests failing with python 2.3 and postgresql_psycopg2 engine)




Change Properties
Action