black
black copied to clipboard
Add regression tests for Black’s previous inconsistent quote formatting with adjacent string literals
Description
Issue #3623 appears to be resolved, added regression tests to monitor this formatting issue and track any potential recurrence.
Regression tests were created based on Black's current stable version (25.1.0) formatting results, see Black Playground.
Checklist - did you ...
- [ ] Add an entry in
CHANGES.mdif necessary? - [x] Add / update tests if necessary?
- [ ] Add new / update outdated documentation?
Given the name of this file fstring.py the tests could be merged into it, but I'm largely indifferent to if they are merged or get their own file so I'll leave that choice to the people with merge power. Other than that LGTM, thanks for the contribution!
Thanks for adding the label. I separated it since #3623's root cause is unclear and may differ from existing f-string coverage. Having a seperate test file could potentially ease future investigation, but I’m fine with either approach.