black/tests
Richard Si ad5c315dda
Actually disable docstring prefix normalization with -S + fix instability (#3168)
The former was a regression I introduced a long time ago. To avoid
changing the stable style too much, the regression is only fixed if
--preview is enabled

Annoyingly enough, as we currently always enforce a second format pass if
changes were made, there's no good way to prove the existence of the
docstring quote normalization instability issue. For posterity, here's
one failing example:

    --- source
    +++ first pass
    @@ -1,7 +1,7 @@
     def some_function(self):
    -    ''''<text here>
    +    """ '<text here>

         <text here, since without another non-empty line black is stable>

    -    '''
    +    """
         pass
    --- first pass
    +++ second pass
    @@ -1,7 +1,7 @@
     def some_function(self):
    -    """ '<text here>
    +    """'<text here>

         <text here, since without another non-empty line black is stable>

         """
         pass

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-07-14 19:47:33 -04:00
..
data Actually disable docstring prefix normalization with -S + fix instability (#3168) 2022-07-14 19:47:33 -04: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 Support pytest 7 by fixing broken imports (GH-2705) 2021-12-24 22:28:43 -05:00
test_black.py Remove newline after code block open (#3035) 2022-06-11 09:55:01 +03:00
test_blackd.py Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
test_format.py Actually disable docstring prefix normalization with -S + fix instability (#3168) 2022-07-14 19:47:33 -04:00
test_ipynb.py Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
test_no_ipynb.py Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00
test_trans.py Fix determination of f-string expression spans (#2654) 2021-12-01 09:52:24 -08:00
test.toml Add support for custom python cell magics (#2744) 2022-01-20 16:45:28 -08:00
util.py Remove hard coded test cases (#3062) 2022-05-18 12:11:37 -07:00