Django

Code

Ticket #8865 (closed: fixed)

Opened 10 months ago

Last modified 10 months ago

fields.py regression test fails

Reported by: pythonhead@gentoo.org Assigned to: nobody
Milestone: Component: Testing framework
Version: 1.0 Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

I'm getting a failure with tests/regressiontests/forms/fields.py

======================================================================
FAIL: Doctest: regressiontests.forms.tests.__test__.fields_tests
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/test/_doctest.py", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.forms.tests.__test__.fields_tests
  File "/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/tests/regressiontests/forms/tests.py", line unknown line number, in fields_tests

----------------------------------------------------------------------
File "/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/tests/regressiontests/forms/tests.py", line ?, in regressiontests.forms.tests.__test__.fields_tests
Failed example:
    fix_os_paths(f.choices)
Expected:
    [('.../django/forms/__init__.py', '__init__.py'), ('.../django/forms/__init__.pyc', '__init__.pyc'), ('.../django/forms/fields.py', 'fields.py'), ('.../django/forms/fields.pyc', 'fields.pyc'), ('.../django/forms/forms.py', 'forms.py'), ('.../django/forms/forms.pyc', 'forms.pyc'), ('.../django/forms/models.py', 'models.py'), ('.../django/forms/models.pyc', 'models.pyc'), ('.../django/forms/util.py', 'util.py'), ('.../django/forms/util.pyc', 'util.pyc'), ('.../django/forms/widgets.py', 'widgets.py'), ('.../django/forms/widgets.pyc', 'widgets.pyc')]
Got:
    [('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/__init__.py', '__init__.py'), ('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/fields.py', 'fields.py'), ('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/forms.py', 'forms.py'), ('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/formsets.py', 'formsets.py'), ('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/models.py', 'models.py'), ('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/util.py', 'util.py'), ('/var/tmp/portage/dev-python/django-1.0/work/Django-1.0/django/forms/widgets.py', 'widgets.py')]


----------------------------------------------------------------------
Ran 525 tests in 1364.088s

FAILED (failures=1)
Destroying test database...


Attachments

django-1.0-fields.py.patch (1.3 kB) - added by pythonhead@gentoo.org on 09/04/08 11:54:51.
tests/regressiontests/forms/fields.py
django-1.0-fields.py.2.patch (1.3 kB) - added by pythonhead on 09/06/08 13:51:57.
Alternate patch that doesn't use match=regex

Change History

09/04/08 11:54:51 changed by pythonhead@gentoo.org

  • attachment django-1.0-fields.py.patch added.

tests/regressiontests/forms/fields.py

09/04/08 11:57:28 changed by pythonhead

  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

The test expects .pyc files, which may not be generated yet because it's not installed. My patch uses a regex to ensure it only tests for .py files.

09/06/08 13:51:57 changed by pythonhead

  • attachment django-1.0-fields.py.2.patch added.

Alternate patch that doesn't use match=regex

09/06/08 14:07:05 changed by pythonhead

  • has_patch set to 1.

09/15/08 06:02:09 changed by kratorius

  • component changed from Uncategorized to Testing framework.

09/17/08 04:32:37 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [9065]) Fixed #8865 -- Improved the robustness of some file path tests. Based on a patch from pythonhead@gentoo.org.


Add/Change #8865 (fields.py regression test fails)




Change Properties
Action