Minimal working example for "unrecognized arguments" error
When running this on Linux, pytest will not accept arguments, see: StackOverflow question
python setup.py --addopts "-s" # OK
python setup.py --addopts "-s --config foobar.does-not-exist" # OK
python setup.py --addopts "-s --config foo.bar" # FAIL
#usage: pytest [options] [file_or_dir] [file_or_dir] [...]
#pytest: error: unrecognized arguments: --config
# inifile: None
# rootdir: /uupmaker
This error happens when invoking tests via pytest -s --config foo.bar
as well. Not limited to setup.py invocation.