X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f1813e31b6deed0901c8a7fb1f102b9af53de351..add161b367a0d5a3cc395ec8e045f7b965edaef8:/tests/test_trans.py diff --git a/tests/test_trans.py b/tests/test_trans.py index a1666a9..784e852 100644 --- a/tests/test_trans.py +++ b/tests/test_trans.py @@ -1,4 +1,5 @@ from typing import List, Tuple + from black.trans import iter_fexpr_spans @@ -12,7 +13,7 @@ def test_fexpr_spans() -> None: # a glance than only spans assert len(spans) == len(expected_slices) for (i, j), slice in zip(spans, expected_slices): - assert len(string[i:j]) == j - i + assert 0 <= i <= j <= len(string) assert string[i:j] == slice assert spans == expected_spans