Make assert in test_str_args_deprecated more resilient

This attempts to fix CI which broke because of this test.

Other warnings introduced in the future could break
this test.
This commit is contained in:
Bruno Oliveira 2016-07-14 18:37:59 -03:00
parent 350ebc9167
commit 3328cd2620
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