aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest/test_formatting.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2021-03-20 13:41:02 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2021-03-20 13:42:40 +0100
commit373baece5094b5bedf10e08ea95d09be3619fd23 (patch)
treede7b6c84c3512c7a08aecf05c351936389bcdebf /_pytest/test_formatting.py
parentbf9ef6f4bcd580a9b4ba858537d0a99cae7bb87e (diff)
downloadwee-slack-373baece5094b5bedf10e08ea95d09be3619fd23.tar.gz
Format all python files with black
Diffstat (limited to '_pytest/test_formatting.py')
-rw-r--r--_pytest/test_formatting.py34
1 files changed, 20 insertions, 14 deletions
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