elpy icon indicating copy to clipboard operation
elpy copied to clipboard

Fix potential bug in test_black.py

Open seppeljordan opened this issue 2 years ago • 1 comments

PR Summary

The test test_fix_code_should_throw_error_without_black_installed was not considering that "blackutil.fix_code" could raise another exception then the desired "Fault" exception. This would lead to a failure in the following tests since "blackutil.black would be reset to its original value, and thus producing a false negative in the process.

PR checklist

Please make sure that the following things have been addressed (and check the relevant checkboxes):

  • [x] Commits respect our guidelines
  • [ ] Tests are passing properly (see here on how to run Elpy's tests)

seppeljordan avatar Mar 24 '22 15:03 seppeljordan

Coverage Status

Coverage remained the same at 90.943% when pulling 9a4abd5466e08cc22da786614cde951e37d35a56 on seppeljordan:black-test-bug into 1746e7009000b7635c0ea6f1559018143aa61642 on jorgenschaefer:master.

coveralls avatar Mar 24 '22 16:03 coveralls