diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-08 00:29:08 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-14 22:19:15 +0200 |
commit | 7a4a95baafc78682288acaa1b4622d87eed1db3e (patch) | |
tree | 54f90bfc95045d6ad1b9ab961bede47be4282c7e /_pytest/test_formatting.py | |
parent | 8ca00d735279e78e759e72c6dff4c17fa43405d5 (diff) | |
download | wee-slack-7a4a95baafc78682288acaa1b4622d87eed1db3e.tar.gz |
Assert color values in tests
Diffstat (limited to '_pytest/test_formatting.py')
-rw-r--r-- | _pytest/test_formatting.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/_pytest/test_formatting.py b/_pytest/test_formatting.py index 74dffba..4f6daa2 100644 --- a/_pytest/test_formatting.py +++ b/_pytest/test_formatting.py @@ -1,6 +1,7 @@ from __future__ import print_function, unicode_literals import pytest +import re import wee_slack @@ -26,4 +27,7 @@ def test_does_not_format(realish_eventrouter, text): "`* * * * * *`", ]) def test_preserves_format_chars_in_code(realish_eventrouter, text): - assert wee_slack.render_formatting(text) == 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) + assert formatted_text == text |