Skip to content

Commit

Permalink
Fixed multiline custom text
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Ryabkov committed Dec 7, 2020
1 parent 0e81557 commit 20dc91d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ History
------------------

* Initial release.

1.0.3
------------------

* Fixed multiline custom text.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Usage
Telegram Bot token
--telegram_report_url=URL
Link for test report, optional
--telegram_custom_test=TEXT
--telegram_custom_text=TEXT
Custom text, will be added for message, optional
--telegram_success_sticker_id=FILE_ID
File id of telegram sticker which will be attach to Success report
Expand Down
2 changes: 1 addition & 1 deletion pytest_telegram/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def pytest_terminal_summary(terminalreporter, exitstatus, config):
success_sticker_id = config.option.success_sticker_id
fail_sticker_id = config.option.fail_sticker_id
report_url = f'\n{config.option.telegram_report_url}' if config.option.telegram_report_url else ''
custom_text = f'\n{config.option.telegram_custom_text}' if config.option.telegram_custom_text else ''
custom_text = f'\n{config.option.telegram_custom_text}'.replace('\\n', '\n') if config.option.telegram_custom_text else ''

final_results = 'Passed=%s Failed=%s Skipped=%s Error=%s XFailed=%s XPassed=%s' % (
passed, failed, skipped, error, xfailed, xpassed)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.0.0
current_version = 1.0.3
commit = True
tag = True

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
test_suite='tests',
tests_require=test_requirements,
url='https://github.com/rad96/pytest-telegram',
version='1.0.2',
version='1.0.3',
zip_safe=False,
entry_points={
'pytest11': [
Expand Down

0 comments on commit 20dc91d

Please sign in to comment.