Node.warn(code, message) form has been deprecated, use Node.warn(warning_instance) instead
See original GitHub issueWith pytest 3.9.2 and pytest-bdd 3.0.0 I get this:
________________ ERROR at teardown of test_match_benchmark[webkit] _________________
tp = <class '_pytest.warning_types.RemovedInPytest4Warning'>, value = None
tb = None
def reraise(tp, value, tb=None):
try:
if value is None:
value = tp()
if value.__traceback__ is not tb:
raise value.with_traceback(tb)
> raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/pytest_benchmark/fixture.py:252: in _cleanup
warner=self._warner, suspend=True)
.tox/py37-pyqt511/lib/python3.7/site-packages/pytest_benchmark/logger.py:40: in warn
warner(code=code, message=text)
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/six.py:693: in reraise
raise value
.tox/py37-pyqt511/lib/python3.7/site-packages/pytest_benchmark/fixture.py:252: in _cleanup
warner=self._warner, suspend=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_benchmark.logger.Logger object at 0x7f5e2c139400>
code = 'BENCHMARK-U1', text = 'Benchmark fixture was not used at all in this test!'
warner = <bound method Node.warn of <Function 'test_show_benchmark[webkit]'>>
suspend = True, fslocation = None
def warn(self, code, text, warner=None, suspend=False, fslocation=None):
if self.verbose:
if suspend and self.capman:
self.capman.suspendcapture(in_=True)
self.term.line("")
self.term.sep("-", red=True, bold=True)
self.term.write(" WARNING: ", red=True, bold=True)
self.term.line(text, red=True)
self.term.sep("-", red=True, bold=True)
if suspend and self.capman:
self.capman.resumecapture()
if warner is None:
warner = self.pytest_warn
if fslocation and self.pytest_warn_has_fslocation:
warner(code=code, message=text, fslocation=fslocation)
else:
> warner(code=code, message=text)
E _pytest.warning_types.RemovedInPytest4Warning: Node.warn(code, message) form has been deprecated, use Node.warn(warning_instance) instead.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
NPM warn message about deprecated package - Stack Overflow
I got an answer for the similar question: https://stackoverflow.com/a/36335866/1115187. Briefly: npm outdated --depth=3.
Read more >Deprecations and Removals — pytest documentation
Instance , and importing it emits a deprecation warning. ... node.warn("CI", "some message") : this code/message form has been removed and should be ......
Read more >Issues - GitHub
DeprecationWarning: Use of deprecated folder mapping "./" in the "exports" field module resolution of the package at G:\SNWS\sn-micro-front-web-project-template ...
Read more >Node.warn( ) help - General - Node-RED Forum
A line of text in the debug window to the right. Not wanting to be difficult, but can I send multiple lines of...
Read more >python-pytest-test-3.10.1-bp151.1.1 - SUSE Package Hub
The warning instance must be a PytestWarning or subclass instance. + node.warn("CI", "some message"): this code/message form is now deprecated and should be ......
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
Released 3.2.0 now.
Master appears to be passing with 4.1. Anything else blocking the release?