black/tests
freddiewanah 133af57207
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.
2023-07-27 12:51:28 -04:00
..
data Fix crash on type comment with trailing space (#3773) 2023-07-09 16:28:26 -07:00
__init__.py Remove deprecated use of 'setup.py test' (#1275) 2020-05-08 06:23:50 -07:00
conftest.py Use optional tests for "no_python2" to simplify local testing (#2203) 2021-05-07 15:03:13 +02:00
empty.toml Add --target-version option to allow users to choose targeted Python versions (#618) 2019-02-06 18:43:50 -08:00
optional.py Use strict mypy checking (#3222) 2022-08-30 20:46:46 -07:00
test_black.py Improve performance by skipping unnecessary normalisation (#3751) 2023-07-09 15:24:01 -07:00
test_blackd.py Use aware datetimes to represent UTC (#3728) 2023-06-10 09:54:21 -07:00
test_format.py Fix removed comments in stub files (#3745) 2023-07-09 15:52:41 -07:00
test_ipynb.py Avoid importing IPython if notebook cells do not contain magics (#3782) 2023-07-16 21:09:26 -04:00
test_no_ipynb.py Enable PYTHONWARNDEFAULTENCODING = 1 in CI (#3763) 2023-07-04 16:38:39 -07:00
test_trans.py Rewrite mostly useless assert in test_trans.py (#3810) 2023-07-27 12:51:28 -04:00
test.toml Add support for custom python cell magics (#2744) 2022-01-20 16:45:28 -08:00
util.py Check stability for both preview and non-preview styles (#3423) 2022-12-17 10:31:47 -08:00