From 02905d8ca5f85f5f7a0dfba6728514edc32c2f8d Mon Sep 17 00:00:00 2001 From: Roman Yurchak Date: Fri, 17 Aug 2018 12:39:46 +0300 Subject: [PATCH] Show pytest report for skipped tests, XFAIL, XPASS --- Makefile | 2 +- test/python_tests.txt | 4 ++-- test/test_python.py | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 4aaf771e5..dc7bfe7fa 100644 --- a/Makefile +++ b/Makefile @@ -99,7 +99,7 @@ build/renderedhtml.css: src/renderedhtml.less test: all build/test.html build/test_data.txt - py.test test -v --instafail + py.test test -v -r sxX --instafail build/test_data.txt: test/data.txt diff --git a/test/python_tests.txt b/test/python_tests.txt index c6e2fc27a..678f31e81 100644 --- a/test/python_tests.txt +++ b/test/python_tests.txt @@ -25,8 +25,8 @@ # - crash: The Python interpreter just stopped without a traceback. Will require # further investigation. This usually seems to be caused by calling into a # system function that doesn't behave as one would expect. -# - crash_chrome: Same as crash but only affecting Chrome -# - crash_firefox: Same as crash but only affecting Firefox +# - crash-chrome: Same as crash but only affecting Chrome +# - crash-firefox: Same as crash but only affecting Firefox test___all__ test___future__ diff --git a/test/test_python.py b/test/test_python.py index ad0be8572..9e24feceb 100644 --- a/test/test_python.py +++ b/test/test_python.py @@ -285,16 +285,16 @@ def test_open_url(selenium): @pytest.mark.flaky(reruns=2) def test_run_core_python_test(python_test, selenium, request): - selenium.load_package('test') - name, error_flags = python_test driver_name = (selenium.__class__.__name__ .replace('Wrapper', '').lower()) if ('crash' in error_flags or - 'crash_' + driver_name in error_flags): + 'crash-' + driver_name in error_flags): request.applymarker(pytest.mark.xfail( run=False, reason='known failure with code "{}"' - .format(error_flags))) + .format(','.join(error_flags)))) + + selenium.load_package('test') try: selenium.run( "from test.libregrtest import main\n"