tests do not change language back after fail
|Reported by:||Owned by:||Claude Paroz|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Currently if django management command have error, it calls sys.exit() and after that changes language to previous.
If I run command it is ok – no code executes after sys.exit, but ChangepasswordManagementCommandTestCase? catches SystemExit? exception and continues execution. And all tests after it have incorrect settings. Solution is to use finally to fix this code.
Change History (6)
comment:1 Changed 5 years ago by
|Cc:||Claude Paroz removed|
|Owner:||changed from nobody to Claude Paroz|
|Triage Stage:||Unreviewed → Accepted|