From: freddiewanah Date: Thu, 27 Jul 2023 16:51:28 +0000 (+1000) Subject: Rewrite mostly useless assert in test_trans.py (#3810) X-Git-Url: https://git.madduck.net/etc/vim.git/commitdiff_plain/133af572072bf7bc92c23a609773c2ea66e483b7?ds=inline;hp=133af572072bf7bc92c23a609773c2ea66e483b7 Rewrite mostly useless assert in test_trans.py (#3810) This PR updates an assert statement that checks the bounds of a string-slicing operation. The updated assertion provides more accurate and informative error handling by specifically checking the relative values of the indices and the string length. The original assertion was essentially checking if Python's string slicing was behaving as expected. However, it wasn't providing any guarantees or useful information about the bounds i and j themselves. The updated assertion checks that the indices used for slicing are within the bounds of the string. It will throw an AssertionError if the indices are out of bounds or if i > j, providing a more specific and informative error. ---