X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/e74117f172e29e8a980e2c9de929ad50d3769150..14ba1bf8b6248e6860ba6a0cb9468c4c1c25a102:/tests/composition.py diff --git a/tests/composition.py b/tests/composition.py index 7b462ac..ea213cf 100644 --- a/tests/composition.py +++ b/tests/composition.py @@ -3,19 +3,43 @@ class C: def test(self) -> None: with patch("black.out", print): self.assertEqual( - unstyle(str(report)), '1 file reformatted, 1 file failed to reformat.' + unstyle(str(report)), "1 file reformatted, 1 file failed to reformat." ) self.assertEqual( unstyle(str(report)), - '1 file reformatted, 1 file left unchanged, 1 file failed to reformat.', + "1 file reformatted, 1 file left unchanged, 1 file failed to reformat.", ) self.assertEqual( unstyle(str(report)), - '2 files reformatted, 1 file left unchanged, ' - '1 file failed to reformat.', + "2 files reformatted, 1 file left unchanged, " + "1 file failed to reformat.", ) self.assertEqual( unstyle(str(report)), - '2 files reformatted, 2 files left unchanged, ' - '2 files failed to reformat.', + "2 files reformatted, 2 files left unchanged, " + "2 files failed to reformat.", ) + for i in (a,): + if ( + # Rule 1 + i % 2 == 0 + # Rule 2 + and i % 3 == 0 + ): + while ( + # Just a comment + call() + # Another + ): + print(i) + + def omitting_trailers() -> None: + get_collection( + hey_this_is_a_very_long_call, it_has_funny_attributes, really=True + )[OneLevelIndex] + get_collection( + hey_this_is_a_very_long_call, it_has_funny_attributes, really=True + )[OneLevelIndex][TwoLevelIndex][ThreeLevelIndex][FourLevelIndex] + d[0][1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][ + 22 + ]