Argument --log-level in nameko conflicts with pytest.
See original GitHub issueArgument in nameko conflicts with pytest
issue
- Python: 3.6.3
- pytest: 3.3.0
- nameko: 2.8.1
### In an empty directory, run pytest.
# cd /tmp/test
# pip install pytest
# pip install nameko
# pytest
_Traceback (most recent call last):
File "/tmp/test/py3/bin/pytest", line 11, in <module>
sys.exit(main())
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 50, in main
config = _prepareconfig(args, plugins)
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 160, in _prepareconfig
pluginmanager=pluginmanager, args=args)
File "/tmp/test/py3/lib/python3.6/site-packages/pluggy/__init__.py", line 617, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/tmp/test/py3/lib/python3.6/site-packages/pluggy/__init__.py", line 222, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/tmp/test/py3/lib/python3.6/site-packages/pluggy/__init__.py", line 216, in <lambda>
firstresult=hook.spec_opts.get('firstresult'),
File "/tmp/test/py3/lib/python3.6/site-packages/pluggy/callers.py", line 196, in _multicall
gen.send(outcome)
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/helpconfig.py", line 68, in pytest_cmdline_parse
config = outcome.get_result()
File "/tmp/test/py3/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
raise ex[1].with_traceback(ex[2])
File "/tmp/test/py3/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
res = hook_impl.function(*args)
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 942, in pytest_cmdline_parse
self.parse(args)
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 1107, in parse
self._preparse(args, addopts=addopts)
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 1072, in _preparse
self.known_args_namespace = ns = self._parser.parse_known_args(args, namespace=self.option.copy())
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 556, in parse_known_args
return self.parse_known_and_unknown_args(args, namespace=namespace)[0]
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 562, in parse_known_and_unknown_args
optparser = self._getparser()
File "/tmp/test/py3/lib/python3.6/site-packages/_pytest/config.py", line 541, in _getparser
arggroup.add_argument(*n, **a)
File "/usr/lib/python3.6/argparse.py", line 1357, in add_argument
return self._add_action(action)
File "/usr/lib/python3.6/argparse.py", line 1561, in _add_action
action = super(_ArgumentGroup, self)._add_action(action)
File "/usr/lib/python3.6/argparse.py", line 1371, in _add_action
self._check_conflict(action)
File "/usr/lib/python3.6/argparse.py", line 1510, in _check_conflict
conflict_handler(action, confl_optionals)
File "/usr/lib/python3.6/argparse.py", line 1519, in _handle_conflict_error
raise ArgumentError(action, message % conflict_string)
argparse.ArgumentError: argument --log-level: conflicting option string: --log-level_
reason
Nameko and pytest have the same option --log-level for pytest_addoption, so pytest will raise argparse.ArgumentError.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
nameko - Read the Docs
Nameko is a framework for building microservices in Python. It comes with built-in support for: • RPC over AMQP.
Read more >How to manage logging — pytest documentation
pytest captures log messages of level WARNING or above automatically and displays them in their own section for each failed test in the...
Read more >pytest - specify log level from the CLI command running the tests
we have multiple layers of logging, we log out ERROR, WARNING, INFO and DEBUG. the default value for our logger is INFO. we...
Read more >nameko Changelog - pyup.io
Remove the pytest `--log-level` argument added by the pytest plugin since this conflicts with newer versions of `pytest` (`>= 3.3.0`). For older
Read more >[Example code]-Python 3 script for logging into a website using the ...
(Im using repl.it website for learning python3) · problems with a random number/letter ... How to set logging level for the module only...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have the exact same issue:
Downgrading pytest to a version lower than 3.3 indeed works.
released as
2.8.2