﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12562	Test failure on Python 2.7 alpha 2	Karen Tracey	Karen Tracey	"I get one (just one!) test failure running the test suite on Python 2.7 alpha 2:

{{{
======================================================================
FAIL: Doctest: regressiontests.fixtures_regress.models.__test__.API_TESTS
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/home/kmt/django/trunk/django/test/_doctest.py"", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.fixtures_regress.models.__test__.API_TESTS
  File ""/home/kmt/django/trunk/tests/regressiontests/fixtures_regress/models.py"", line unknown line number, in API_TESTS

----------------------------------------------------------------------
File ""/home/kmt/django/trunk/tests/regressiontests/fixtures_regress/models.py"", line ?, in regressiontests.fixtures_regress.models.__test__.API_TESTS
Failed example:
    management.call_command('dumpdata', 'fixtures_regress.animal', format='json')
Expected:
    [{""pk"": 1, ""model"": ""fixtures_regress.animal"", ""fields"": {""count"": 3, ""weight"": 1.2, ""name"": ""Lion"", ""latin_name"": ""Panthera leo""}}, {""pk"": 2, ""model"": ""fixtures_regress.animal"", ""fields"": {""count"": 2, ""weight"": 2.29..., ""name"": ""Platypus"", ""latin_name"": ""Ornithorhynchus anatinus""}}, {""pk"": 10, ""model"": ""fixtures_regress.animal"", ""fields"": {""count"": 42, ""weight"": 1.2, ""name"": ""Emu"", ""latin_name"": ""Dromaius novaehollandiae""}}]
Got:
    [{""pk"": 1, ""model"": ""fixtures_regress.animal"", ""fields"": {""count"": 3, ""weight"": 1.2, ""name"": ""Lion"", ""latin_name"": ""Panthera leo""}}, {""pk"": 2, ""model"": ""fixtures_regress.animal"", ""fields"": {""count"": 2, ""weight"": 2.3, ""name"": ""Platypus"", ""latin_name"": ""Ornithorhynchus anatinus""}}, {""pk"": 10, ""model"": ""fixtures_regress.animal"", ""fields"": {""count"": 42, ""weight"": 1.2, ""name"": ""Emu"", ""latin_name"": ""Dromaius novaehollandiae""}}]


----------------------------------------------------------------------
Ran 1242 tests in 902.979s

FAILED (failures=1)

}}}

The only difference is in the weight of the Platypus.  We're expecting 2.29something but now getting 2.3.  As the Platypus is actually added with a weight of 2.3, I think the change is due to improved string/float rounding in this version of Python (noted as one of the 3.1 changes backported to 2.7 here: http://docs.python.org/dev/whatsnew/2.7.html#python-3-1-features).  I think we can fix this by simply changing the weight here to be one that won't exhibit this anomalous behavior between different Python versions?"		closed	Uncategorized	1.1		fixed			Accepted	0	0	0	0	0	0
