For the hook, if I use the cURL example provided by Slack, it works fine.
I created a basic slack hook with "Incoming Webhooks, Bots and Permissions enabled".
pytest test_main_page.py –slack_hook=https://hooks.slack.com/services/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 –slack_channel=test_report_channel –slack_username=”Regression testing results”
==================================================================== test session starts ====================================================================
platform darwin -- Python 3.7.2, pytest-5.3.5, py-1.7.0, pluggy-0.13.1
rootdir: /Users/myuser/website-tests
plugins: xdist-1.26.0, timeout-1.3.3, teamcity-messages-1.21, rerunfailures-8.0, curl-report-0.5.4, slack-2.2.0, forked-1.0.1
collected 0 items
=================================================================== no tests ran in 0.01s ===================================================================
ERROR: file not found: –slack_hook=https://hooks.slack.com/services/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igwo