Opened 11 years ago
Closed 9 years ago
#21549 closed Cleanup/optimization (fixed)
Fixture loading warning when the file is not found should be an exception
Reported by: | Michał Pasternak | Owned by: | Andrew Kuchev |
---|---|---|---|
Component: | Core (Management commands) | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
Fixture lodaing should fail with an exception when there is no fixture file in both loaddata AND unit tests.
Any reasons, why do we silently ignore the fact of missing fixture file ATM?
If none, I can try working on a patch.
Change History (7)
comment:1 by , 11 years ago
Component: | Uncategorized → Core (Management commands) |
---|---|
Triage Stage: | Unreviewed → Accepted |
Version: | 1.6 → master |
comment:2 by , 11 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
The loaddata function in find_fixtures via load_label warns properly, however something in the interactive command is masking the error. I will continue investigating the issue.
follow-up: 5 comment:3 by , 9 years ago
Easy pickings: | set |
---|---|
Owner: | removed |
Status: | assigned → new |
Summary: | Fixture loading should fail with a BIG LOUD EXCEPTION when the file is not found → Fixture loading warning when the file is not found should be an exception |
Type: | Bug → Cleanup/optimization |
The idea is to change the warning to CommandError
. The warning about "No fixture data found" in that same file might be able to be changed as well. Some tests will need to be adapted and we'll need a mention in the release notes.
comment:4 by , 9 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:5 by , 9 years ago
Replying to timgraham:
The warning about "No fixture data found" in that same file might be able to be changed as well. Some tests will need to be adapted and we'll need a mention in the release notes.
"No fixture data found" was an error before 2013, however it has been changed to a warning with PR #799. Should it be implemented as error again?
The current behavior of issuing a warning is indeed kind of odd.