Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#14947 closed (fixed)

regressiontests.fixtures_regress.tests.TestFixtures.test_dumpdata_uses_default_manager() fails with Python 2.7

Reported by: Arfrever Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords: blocker, regression
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

regressiontests.fixtures_regress.tests.TestFixtures.test_dumpdata_uses_default_manager() fails with Python 2.7. This test passes with Python 2.6.

======================================================================
FAIL: test_dumpdata_uses_default_manager (regressiontests.fixtures_regress.tests.TestFixtures)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/django-1.2.4/work/Django-1.2.4/tests/regressiontests/fixtures_regress/tests.py", line 335, in test_dumpdata_uses_default_manager
    self.assertEqual(len(data), len('[%s]' % ', '.join([lion_json, emu_json, platypus_json])))
AssertionError: 426 != 441

----------------------------------------------------------------------

Change History (9)

comment:1 by Russell Keith-Magee, 13 years ago

milestone: 1.3
Triage Stage: UnreviewedAccepted

Confirmed; test fails under Python2.7, using Django 1.2.4. Doesn't fail for trunk, or using Python 2.6.

This is therefore a 1.3 blocker.

comment:2 by Russell Keith-Magee, 13 years ago

Looks like this is just an output formatting difference; A decimal value is getting output as "2.2000000000000002" under Python 2.6, but as "2.2" under Python 2.7.

comment:3 by Karen Tracey, 13 years ago

Easy fix (I think) would then be to just change the test data to a value that does not differ between Pythons...this is what we did for #12562.

comment:4 by Russell Keith-Magee, 13 years ago

Keywords: blocker regression added

comment:5 by Travis Cline, 13 years ago

Resolution: fixed
Status: newclosed

This was fixed in [14309] by Luke

comment:6 by Russell Keith-Magee, 13 years ago

Resolution: fixed
Status: closedreopened

It may have been fixed on trunk, but the report is for the 1.2 branch. Looks like 14309 needs to be backported.

comment:7 by Travis Cline, 13 years ago

Ah, my mistake.

comment:8 by Luke Plant, 13 years ago

Resolution: fixed
Status: reopenedclosed

(In [15165]) [1.2.X] Fixed test failure when using Python 2.7

Backport of [14309] from trunk.

Fixed #14947

comment:9 by Jacob, 13 years ago

milestone: 1.3

Milestone 1.3 deleted

Note: See TracTickets for help on using tickets.
Back to Top