2016-07-23 22:56:04 +08:00
|
|
|
"""
|
|
|
|
This module contains deprecation messages and bits of code used elsewhere in the codebase
|
|
|
|
that is planned to be removed in the next pytest release.
|
|
|
|
|
|
|
|
Keeping it in a central location makes it easy to track what is deprecated and should
|
|
|
|
be removed when the time comes.
|
|
|
|
"""
|
2017-03-17 09:21:30 +08:00
|
|
|
from __future__ import absolute_import, division, print_function
|
2016-07-23 22:56:04 +08:00
|
|
|
|
2017-06-22 21:12:50 +08:00
|
|
|
|
|
|
|
class RemovedInPytest4_0Warning(DeprecationWarning):
|
|
|
|
"warning class for features removed in pytest 4.0"
|
|
|
|
|
|
|
|
|
2016-07-23 22:56:04 +08:00
|
|
|
MAIN_STR_ARGS = 'passing a string to pytest.main() is deprecated, ' \
|
|
|
|
'pass a list of arguments instead.'
|
|
|
|
|
|
|
|
YIELD_TESTS = 'yield tests are deprecated, and scheduled to be removed in pytest 4.0'
|
|
|
|
|
|
|
|
FUNCARG_PREFIX = (
|
|
|
|
'{name}: declaring fixtures using "pytest_funcarg__" prefix is deprecated '
|
|
|
|
'and scheduled to be removed in pytest 4.0. '
|
|
|
|
'Please remove the prefix and use the @pytest.fixture decorator instead.')
|
|
|
|
|
2016-08-17 08:30:07 +08:00
|
|
|
SETUP_CFG_PYTEST = '[pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.'
|
|
|
|
|
2016-07-23 22:56:04 +08:00
|
|
|
GETFUNCARGVALUE = "use of getfuncargvalue is deprecated, use getfixturevalue"
|
|
|
|
|
2016-08-17 07:22:15 +08:00
|
|
|
RESULT_LOG = '--result-log is deprecated and scheduled for removal in pytest 4.0'
|
2017-06-22 21:12:50 +08:00
|
|
|
|
|
|
|
MARK_INFO_ATTRIBUTE = RemovedInPytest4_0Warning(
|
|
|
|
"Markinfo attributes are deprecated, please iterate the mark Collection")
|