#34626 closed Cleanup/optimization (invalid)

Documentation: "Writing your first patch for Django" - Example test file "test_make_toast.py" is not loaded by test suite

Reported by: Lukas von Allmen Owned by: Lukas von Allmen
Component: Documentation Version: dev
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

Description

While going through the documentation for Writing your first patch for Django - Writing a test for ticket #99999, I created the file "test_make_toast.py" and after executing "./runtests.py shortcuts" the test run still succeeds. At this point in the walkthrough the tests should file with the error message "ImportError: cannot import name 'make_toast' from 'django.shortcuts'". It turned out the word "test" in the file name "test_make_toast.py" must be in plural to be loaded by the test suite: "tests_make_toast.py".

Solution:
Rename "test_make_toast.py" to "tests_make_toast.py" on this documentation page.

Change History (1)

comment:1 by Mariusz Felisiak, 19 months ago

Resolution: invalid
Status: assignedclosed

We have many tests files with test_* names and everything works fine.

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