Supporting Chrome/Firefox specific failures

This commit is contained in:
Roman Yurchak 2018-08-17 12:39:04 +03:00
parent 30195bfa8a
commit 22ecc34847
1 changed files with 4 additions and 1 deletions

View File

@ -288,7 +288,10 @@ def test_run_core_python_test(python_test, selenium, request):
selenium.load_package('test') selenium.load_package('test')
name, error_flags = python_test name, error_flags = python_test
if error_flags: driver_name = (selenium.__class__.__name__
.replace('Wrapper', '').lower())
if ('crash' in error_flags or
'crash_' + driver_name in error_flags):
request.applymarker(pytest.mark.xfail( request.applymarker(pytest.mark.xfail(
run=False, reason='known failure with code "{}"' run=False, reason='known failure with code "{}"'
.format(error_flags))) .format(error_flags)))