pytest-dev / pytest-messenger

Pytest-messenger report plugin for all popular messengers like: Slack, DingTalk, Telegram
https://pypi.org/project/pytest-messenger
MIT License
67 stars 15 forks source link

Slack options are not recognized and showing "ERROR: file or directory not found : –-slack_*" #241

Closed yizhe-shoreline closed 5 months ago

yizhe-shoreline commented 5 months ago

Hi, we are trying out pytest-messenger to send slack message with the test result summary. When I run the "pytest --help", I can see the messenger plugin was loaded and command options were listed, but the slack command options were not recognized when I run it, got ERROR: "file or directory not found: –-slack_channel". Below is the part of the command output.

 % pytest –-slack_channel=***** –-slack_username="****" --base-url "****" **************
=========================================================================== test session starts ============================================================================
platform darwin -- Python 3.10.3, pytest-7.4.4, pluggy-1.3.0
baseurl: ******
rootdir: /tmp
plugins: playwright-0.4.3, reporter-html1-0.8.4, repeat-0.9.3, html-4.1.1, base-url-2.0.0, metadata-3.0.0, messenger-3.3.0, reporter-0.5.3
collected 0 items                                                                                                                                                          
collected 0 items                                                                                                                                                          
...........
..........
========================================================================== no tests ran in 0.03s ===========================================================================
ERROR: file or directory not found: –-slack_channel=*********