Skip to content

Test failure with Python 3.3 #66

Closed
Arfrever opened this Issue Oct 2, 2012 · 1 comment

2 participants

@Arfrever
Arfrever commented Oct 2, 2012

Colander 0.9.9 introduced test_serialize_quantize_no_rounding(), which fails with Python 3.3. It passes with older versions of Python.

$ python3.3 setup.py test
...
======================================================================
ERROR: test_serialize_quantize_no_rounding (colander.tests.test_colander.TestDecimal)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/colander-0.9.9/colander/__init__.py", line 1035, in serialize
    return str(self.num(appstruct))
  File "/tmp/colander-0.9.9/colander/__init__.py", line 1109, in num
    result = result.quantize(self.quant, self.rounding)
TypeError: an integer is required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/colander-0.9.9/colander/tests/test_colander.py", line 1371, in test_serialize_quantize_no_rounding
    result = typ.serialize(node, val)
  File "/tmp/colander-0.9.9/colander/__init__.py", line 1039, in serialize
    mapping={'val':appstruct}),
colander.Invalid: {'': '".000001" is not a number'}

----------------------------------------------------------------------
Ran 335 tests in 0.195s

FAILED (errors=1)
@mcdonc mcdonc added a commit that closed this issue Oct 2, 2012
@mcdonc mcdonc - Work around a regression in Python 3.3 for ``colander.Decimal`` whe…
…n it's

  used with a ``quant`` argument but without a ``rounding`` argument.
  See #66

- Add Python 3.3 to tox configuration and use newer tox testing regime
  (setup.py dev).

Closes #66
f180c6a
@mcdonc mcdonc closed this in f180c6a Oct 2, 2012
@mcdonc
Pylons Project member
mcdonc commented Oct 2, 2012

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.