From 373baece5094b5bedf10e08ea95d09be3619fd23 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sat, 20 Mar 2021 13:41:02 +0100 Subject: Format all python files with black --- _pytest/test_formatting.py | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to '_pytest/test_formatting.py') diff --git a/_pytest/test_formatting.py b/_pytest/test_formatting.py index 4f6daa2..e88c4af 100644 --- a/_pytest/test_formatting.py +++ b/_pytest/test_formatting.py @@ -6,28 +6,34 @@ import re import wee_slack -@pytest.mark.parametrize("text", [ - """ +@pytest.mark.parametrize( + "text", + [ + """ * an item * another item """, - "* Run this command: `find . -name '*.exe'`", -]) + "* Run this command: `find . -name '*.exe'`", + ], +) def test_does_not_format(realish_eventrouter, text): assert wee_slack.render_formatting(text) == text -@pytest.mark.parametrize("text", [ - "`hello *bar*`", - "`*`", - "`* *`", - "`* * *`", - "`* * * *`", - "`* * * * *`", - "`* * * * * *`", -]) +@pytest.mark.parametrize( + "text", + [ + "`hello *bar*`", + "`*`", + "`* *`", + "`* * *`", + "`* * * *`", + "`* * * * *`", + "`* * * * * *`", + ], +) def test_preserves_format_chars_in_code(realish_eventrouter, text): formatted_text = wee_slack.render_formatting(text) # TODO: wee-slack erroneously inserts formatting in code blocks - formatted_text = re.sub(r'<\[color .*?\]>', '', formatted_text) + formatted_text = re.sub(r"<\[color .*?\]>", "", formatted_text) assert formatted_text == text -- cgit