Opened 23 months ago
Closed 23 months ago
#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
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.
We have many tests files with
test_*
names and everything works fine.