Opened 12 years ago
Closed 12 years ago
#18964 closed Bug (fixed)
defaultfilters test passes unexpectedly under Python 3
Reported by: | Russell Keith-Magee | Owned by: | Aymeric Augustin |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Release blocker | Keywords: | python3 |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
defaultfilters.DefaultFiltersTests.test_floatformat_fail is currently marked as an expected failure; and under Python 2, it does fail.
Under Python 3 (at least, with Python 3.2.3 64 bit under OSX), the test passes.
It's entirely possible that the resolution is "don't worry about it" - after all, there are worse problems than an unexpected test pass. However, since it is an oddity in test suite results that may have gone unnoticed (since 'unexpected pass' would be easy to miss in test suite results), I'm marking this as a release blocker.
Change History (4)
comment:1 by , 12 years ago
Keywords: | python3 added |
---|---|
Version: | 1.4 → master |
comment:2 by , 12 years ago
Owner: | changed from | to
---|
comment:3 by , 12 years ago
comment:4 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The test that unexpectedly passes is:
Under Python 2, it returns
'1.0000000000000000'
.The explanation is pretty simple.
The first step of the
floatformat
template filter is to coerce its input as text, and this step introduces the difference between Python 2 and Python 3.I think it's related to this paragraph of Python 3.1's release notes:
Arguably, this is a bug in Python 2 that was fixed in Python 3. I'm going to mark the test as an expected failure only on Python 2.