Opened 7 years ago

Closed 7 years ago

#8865 closed (fixed)

fields.py regression test fails

Reported by: pythonhead@… Owned by: nobody
Component: Testing framework Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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 (2)

django-1.0-fields.py.patch (1.3 KB) - added by pythonhead@… 7 years ago.
tests/regressiontests/forms/fields.py
django-1.0-fields.py.2.patch (1.3 KB) - added by pythonhead 7 years ago.
Alternate patch that doesn't use match=regex

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by pythonhead@…

tests/regressiontests/forms/fields.py

comment:1 Changed 7 years ago by pythonhead

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

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.

Changed 7 years ago by pythonhead

Alternate patch that doesn't use match=regex

comment:2 Changed 7 years ago by pythonhead

  • Has patch set

comment:3 Changed 7 years ago by kratorius

  • Component changed from Uncategorized to Testing framework

comment:4 Changed 7 years ago by mtredinnick

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

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

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