Opened 17 years ago
Closed 17 years ago
#5751 closed (duplicate)
manage.py test doesn't run doctests for models split into separate files
Reported by: | Antti Kaihola | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If models are split into separate files like this:
myapp/models/__init__.py myapp/models/polls.py myapp/models/posts.py
the manage.py test
command only runs doctests for models defined in myapp/models/__init__.py
.
This is true even if I import all the models in __init__.py
.
Attachments (1)
Change History (5)
comment:1 by , 17 years ago
by , 17 years ago
Attachment: | doctest_submodules.diff added |
---|
suggested patch, doctests now found inside multiple model files
comment:2 by , 17 years ago
Has patch: | set |
---|
Patch above. It would make sense to combine this with the patch for #3310.
I don't know how to write tests for this...
Note:
See TracTickets
for help on using tickets.
This seems to be
doctest.DocTestFinder
's intended behavior, which should be worked around if this is to be fixed.