Opened 4 years ago

Closed 4 years ago

Last modified 4 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: UI/UX:

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 Changed 4 years ago by russellm

  • milestone set to 1.3
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 4 years ago by russellm

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 Changed 4 years ago by kmtracey

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 Changed 4 years ago by russellm

  • Keywords blocker regression added

comment:5 Changed 4 years ago by tclineks

  • Resolution set to fixed
  • Status changed from new to closed

This was fixed in [14309] by Luke

comment:6 Changed 4 years ago by russellm

  • Resolution fixed deleted
  • Status changed from closed to reopened

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 Changed 4 years ago by tclineks

Ah, my mistake.

comment:8 Changed 4 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from reopened to closed

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

Backport of [14309] from trunk.

Fixed #14947

comment:9 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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