Add deprecation module to centralize deprecation messages and bits of code

This commit is contained in:
Bruno Oliveira
2016-07-23 11:56:04 -03:00
parent ae0798522f
commit 6c8b0a28e1
8 changed files with 85 additions and 63 deletions

View File

@@ -115,10 +115,8 @@ def _prepareconfig(args=None, plugins=None):
if not isinstance(args, str):
raise ValueError("not a string or argument list: %r" % (args,))
args = shlex.split(args, posix=sys.platform != "win32")
# we want to remove this way of passing arguments to pytest.main()
# in pytest-4.0
warning = ('passing a string to pytest.main() is deprecated, '
'pass a list of arguments instead.')
from _pytest import deprecated
warning = deprecated.MAIN_STR_ARGS
config = get_config()
pluginmanager = config.pluginmanager
try: