Merge pull request #1731 from nicoddemus/improve-test-args-deprecated

Make assert in test_str_args_deprecated more resilient
This commit is contained in:
Bruno Oliveira 2016-07-14 19:18:13 -03:00 committed by GitHub
commit ee374e3b80
1 changed files with 3 additions and 1 deletions

View File

@ -807,5 +807,7 @@ def test_str_args_deprecated(tmpdir, testdir):
ret = pytest.main("%s -x" % tmpdir, plugins=[Collect()])
testdir.delete_loaded_modules()
assert warnings == ['passing a string to pytest.main() is deprecated, pass a list of arguments instead.']
msg = ('passing a string to pytest.main() is deprecated, '
'pass a list of arguments instead.')
assert msg in warnings
assert ret == EXIT_NOTESTSCOLLECTED