Opened 8 years ago

Closed 8 years ago

#26017 closed Uncategorized (fixed)

forms_tests.tests.test_fields.FieldsTests.test_filepathfield_folders does not work when the tests directory is named differently

Reported by: Raphaël Hertzog Owned by: nobody
Component: Uncategorized Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


I tried "cp -a tests ~/tmp/django-tests" and then ran the tests from ~/tmp/django-tests. It turns out you get this failure:

FAIL: test_filepathfield_folders (forms_tests.tests.test_fields.FieldsTests)
Traceback (most recent call last):
  File "/home/rhertzog/tmp/django-tests/forms_tests/tests/", line 1586, in test_filepathfield_folders
AssertionError: False is not true

Printing got and exp before the test you see this:

(u'/home/rhertzog/tmp/django-tests/forms_tests/tests/filepath_test_files/directory', u'directory')
(u'/tests/forms_tests/tests/filepath_test_files/directory', u'directory')

As you can see the difference is in the "/django-tests/" vs "/tests/" that do not match.

I would suggest that tests should not depend on the name of the top-level directory in which they are stored... it's an easy patch and I will submit it soon as PR.

Change History (3)

comment:1 by Raphaël Hertzog, 8 years ago

comment:2 by Raphaël Hertzog, 8 years ago

Has patch: set

comment:3 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In e0f3703:

Fixed #26017 -- Removed a dependency on the name of the top-level tests directory.

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