diff --git a/CONTRIBUTING.asciidoc b/CONTRIBUTING.asciidoc index aa0322008..e18c0f77b 100644 --- a/CONTRIBUTING.asciidoc +++ b/CONTRIBUTING.asciidoc @@ -158,11 +158,11 @@ Examples: # run only pytest tests which failed in last run: tox -e py35 -- --lf -# run only the integration feature tests: -tox -e py35 -- tests/integration/features +# run only the end2end feature tests: +tox -e py35 -- tests/end2end/features # run everything with undo in the generated name, based on the scenario text -tox -e py35 -- tests/integration/features/test_tabs.py -k undo +tox -e py35 -- tests/end2end/features/test_tabs_bdd.py -k undo # run coverage test for specific file (updates htmlcov/index.html) tox -e py35-cov -- tests/unit/browser/test_webelem.py diff --git a/pytest.ini b/pytest.ini index 3d99b7c78..e5c721af4 100644 --- a/pytest.ini +++ b/pytest.ini @@ -11,7 +11,8 @@ markers = not_frozen: Tests which can't be run if sys.frozen is True. no_xvfb: Tests which can't be run with Xvfb. frozen: Tests which can only be run if sys.frozen is True. - integration: Tests which test a bigger portion of code, run without coverage. + integration: Tests which test a bigger portion of code + end2end: End to end tests which run qutebrowser as subprocess skip: Always skipped test. pyqt531_or_newer: Needs PyQt 5.3.1 or newer. xfail_norun: xfail the test with out running it diff --git a/scripts/dev/check_coverage.py b/scripts/dev/check_coverage.py index beb92b756..cfe8d74a8 100644 --- a/scripts/dev/check_coverage.py +++ b/scripts/dev/check_coverage.py @@ -143,7 +143,7 @@ PERFECT_FILES = [ ] -# 100% coverage because of integration tests, but no perfect unit tests yet. +# 100% coverage because of end2end tests, but no perfect unit tests yet. WHITELISTED_FILES = [] diff --git a/scripts/dev/freeze_tests.py b/scripts/dev/freeze_tests.py index 36f1a6c71..db347a66a 100755 --- a/scripts/dev/freeze_tests.py +++ b/scripts/dev/freeze_tests.py @@ -60,8 +60,8 @@ def get_build_exe_options(): httpbin_dir = os.path.dirname(httpbin.__file__) opts['include_files'] += [ - ('tests/integration/data', 'integration/data'), - (os.path.join(httpbin_dir, 'templates'), 'integration/templates'), + ('tests/end2end/data', 'end2end/data'), + (os.path.join(httpbin_dir, 'templates'), 'end2end/templates'), ] opts['packages'].append('qutebrowser') @@ -72,11 +72,13 @@ def main(): base = 'Win32GUI' if sys.platform.startswith('win') else None with temp_git_commit_file(): cx.setup( - executables=[cx.Executable('scripts/dev/run_frozen_tests.py', - targetName='run-frozen-tests'), - cx.Executable('tests/integration/webserver_sub.py', - targetName='webserver_sub'), - freeze.get_exe(base, target_name='qutebrowser')], + executables=[ + cx.Executable('scripts/dev/run_frozen_tests.py', + targetName='run-frozen-tests'), + cx.Executable('tests/end2end/fixtures/webserver_sub.py', + targetName='webserver_sub'), + freeze.get_exe(base, target_name='qutebrowser') + ], options={'build_exe': get_build_exe_options()}, **setupcommon.setupdata ) diff --git a/tests/conftest.py b/tests/conftest.py index 67be7f8e0..39e88e96c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -107,8 +107,8 @@ def pytest_collection_modifyitems(items): os.path.commonprefix([__file__, item.module.__file__])) module_root_dir = os.path.split(module_path)[0] - if module_root_dir == 'integration': - item.add_marker(pytest.mark.integration) + if module_root_dir == 'end2end': + item.add_marker(pytest.mark.end2end) _apply_platform_markers(item) if item.get_marker('xfail_norun'): @@ -118,7 +118,7 @@ def pytest_collection_modifyitems(items): def pytest_ignore_collect(path): """Ignore BDD tests during collection if frozen.""" rel_path = path.relto(os.path.dirname(__file__)) - return (rel_path == os.path.join('integration', 'features') and + return (rel_path == os.path.join('end2end', 'features') and hasattr(sys, 'frozen')) diff --git a/tests/integration/conftest.py b/tests/end2end/conftest.py similarity index 83% rename from tests/integration/conftest.py rename to tests/end2end/conftest.py index 7bd684daa..b12c5c951 100644 --- a/tests/integration/conftest.py +++ b/tests/end2end/conftest.py @@ -19,15 +19,15 @@ # pylint: disable=unused-import -"""Things needed for integration testing.""" +"""Things needed for end2end testing.""" import os import shutil import pstats -from webserver import httpbin, httpbin_after_test, ssl_server -from quteprocess import quteproc_process, quteproc, quteproc_new -from testprocess import pytest_runtest_makereport +from end2end.fixtures.webserver import httpbin, httpbin_after_test, ssl_server +from end2end.fixtures.quteprocess import quteproc_process, quteproc, quteproc_new +from end2end.fixtures.testprocess import pytest_runtest_makereport def pytest_configure(config): diff --git a/tests/integration/data/backforward/1.txt b/tests/end2end/data/backforward/1.txt similarity index 100% rename from tests/integration/data/backforward/1.txt rename to tests/end2end/data/backforward/1.txt diff --git a/tests/integration/data/backforward/2.txt b/tests/end2end/data/backforward/2.txt similarity index 100% rename from tests/integration/data/backforward/2.txt rename to tests/end2end/data/backforward/2.txt diff --git a/tests/integration/data/backforward/3.txt b/tests/end2end/data/backforward/3.txt similarity index 100% rename from tests/integration/data/backforward/3.txt rename to tests/end2end/data/backforward/3.txt diff --git a/tests/integration/data/caret.html b/tests/end2end/data/caret.html similarity index 100% rename from tests/integration/data/caret.html rename to tests/end2end/data/caret.html diff --git a/tests/integration/data/click_element.html b/tests/end2end/data/click_element.html similarity index 100% rename from tests/integration/data/click_element.html rename to tests/end2end/data/click_element.html diff --git a/tests/integration/data/downloads/download.bin b/tests/end2end/data/downloads/download.bin similarity index 100% rename from tests/integration/data/downloads/download.bin rename to tests/end2end/data/downloads/download.bin diff --git a/tests/integration/data/downloads/issue1214.html b/tests/end2end/data/downloads/issue1214.html similarity index 100% rename from tests/integration/data/downloads/issue1214.html rename to tests/end2end/data/downloads/issue1214.html diff --git a/tests/integration/data/downloads/issue1243.html b/tests/end2end/data/downloads/issue1243.html similarity index 100% rename from tests/integration/data/downloads/issue1243.html rename to tests/end2end/data/downloads/issue1243.html diff --git a/tests/integration/data/downloads/issue889.html b/tests/end2end/data/downloads/issue889.html similarity index 100% rename from tests/integration/data/downloads/issue889.html rename to tests/end2end/data/downloads/issue889.html diff --git a/tests/integration/data/downloads/mhtml/complex/Background.png b/tests/end2end/data/downloads/mhtml/complex/Background.png similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/Background.png rename to tests/end2end/data/downloads/mhtml/complex/Background.png diff --git a/tests/integration/data/downloads/mhtml/complex/Banner.png b/tests/end2end/data/downloads/mhtml/complex/Banner.png similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/Banner.png rename to tests/end2end/data/downloads/mhtml/complex/Banner.png diff --git a/tests/integration/data/downloads/mhtml/complex/DYK.png b/tests/end2end/data/downloads/mhtml/complex/DYK.png similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/DYK.png rename to tests/end2end/data/downloads/mhtml/complex/DYK.png diff --git a/tests/integration/data/downloads/mhtml/complex/Inline.png b/tests/end2end/data/downloads/mhtml/complex/Inline.png similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/Inline.png rename to tests/end2end/data/downloads/mhtml/complex/Inline.png diff --git a/tests/integration/data/downloads/mhtml/complex/base.css b/tests/end2end/data/downloads/mhtml/complex/base.css similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/base.css rename to tests/end2end/data/downloads/mhtml/complex/base.css diff --git a/tests/integration/data/downloads/mhtml/complex/complex.html b/tests/end2end/data/downloads/mhtml/complex/complex.html similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/complex.html rename to tests/end2end/data/downloads/mhtml/complex/complex.html diff --git a/tests/integration/data/downloads/mhtml/complex/complex.mht b/tests/end2end/data/downloads/mhtml/complex/complex.mht similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/complex.mht rename to tests/end2end/data/downloads/mhtml/complex/complex.mht diff --git a/tests/integration/data/downloads/mhtml/complex/external-in-extern.css b/tests/end2end/data/downloads/mhtml/complex/external-in-extern.css similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/external-in-extern.css rename to tests/end2end/data/downloads/mhtml/complex/external-in-extern.css diff --git a/tests/integration/data/downloads/mhtml/complex/favicon.png b/tests/end2end/data/downloads/mhtml/complex/favicon.png similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/favicon.png rename to tests/end2end/data/downloads/mhtml/complex/favicon.png diff --git a/tests/integration/data/downloads/mhtml/complex/requests b/tests/end2end/data/downloads/mhtml/complex/requests similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/requests rename to tests/end2end/data/downloads/mhtml/complex/requests diff --git a/tests/integration/data/downloads/mhtml/complex/script.js b/tests/end2end/data/downloads/mhtml/complex/script.js similarity index 100% rename from tests/integration/data/downloads/mhtml/complex/script.js rename to tests/end2end/data/downloads/mhtml/complex/script.js diff --git a/tests/integration/data/downloads/mhtml/simple/requests b/tests/end2end/data/downloads/mhtml/simple/requests similarity index 100% rename from tests/integration/data/downloads/mhtml/simple/requests rename to tests/end2end/data/downloads/mhtml/simple/requests diff --git a/tests/integration/data/downloads/mhtml/simple/simple.html b/tests/end2end/data/downloads/mhtml/simple/simple.html similarity index 100% rename from tests/integration/data/downloads/mhtml/simple/simple.html rename to tests/end2end/data/downloads/mhtml/simple/simple.html diff --git a/tests/integration/data/downloads/mhtml/simple/simple.mht b/tests/end2end/data/downloads/mhtml/simple/simple.mht similarity index 100% rename from tests/integration/data/downloads/mhtml/simple/simple.mht rename to tests/end2end/data/downloads/mhtml/simple/simple.mht diff --git a/tests/integration/data/downloads/ä-issue908.bin b/tests/end2end/data/downloads/ä-issue908.bin similarity index 100% rename from tests/integration/data/downloads/ä-issue908.bin rename to tests/end2end/data/downloads/ä-issue908.bin diff --git a/tests/integration/data/hello.txt b/tests/end2end/data/hello.txt similarity index 100% rename from tests/integration/data/hello.txt rename to tests/end2end/data/hello.txt diff --git a/tests/integration/data/hello2.txt b/tests/end2end/data/hello2.txt similarity index 100% rename from tests/integration/data/hello2.txt rename to tests/end2end/data/hello2.txt diff --git a/tests/integration/data/hello3.txt b/tests/end2end/data/hello3.txt similarity index 100% rename from tests/integration/data/hello3.txt rename to tests/end2end/data/hello3.txt diff --git a/tests/integration/data/hinting.txt b/tests/end2end/data/hinting.txt similarity index 100% rename from tests/integration/data/hinting.txt rename to tests/end2end/data/hinting.txt diff --git a/tests/integration/data/hints/html/nested_block_style.html b/tests/end2end/data/hints/html/nested_block_style.html similarity index 100% rename from tests/integration/data/hints/html/nested_block_style.html rename to tests/end2end/data/hints/html/nested_block_style.html diff --git a/tests/integration/data/hints/html/nested_formatting_tags.html b/tests/end2end/data/hints/html/nested_formatting_tags.html similarity index 100% rename from tests/integration/data/hints/html/nested_formatting_tags.html rename to tests/end2end/data/hints/html/nested_formatting_tags.html diff --git a/tests/integration/data/hints/html/nested_table_style.html b/tests/end2end/data/hints/html/nested_table_style.html similarity index 100% rename from tests/integration/data/hints/html/nested_table_style.html rename to tests/end2end/data/hints/html/nested_table_style.html diff --git a/tests/integration/data/hints/html/simple.html b/tests/end2end/data/hints/html/simple.html similarity index 100% rename from tests/integration/data/hints/html/simple.html rename to tests/end2end/data/hints/html/simple.html diff --git a/tests/integration/data/hints/html/wrapped.html b/tests/end2end/data/hints/html/wrapped.html similarity index 100% rename from tests/integration/data/hints/html/wrapped.html rename to tests/end2end/data/hints/html/wrapped.html diff --git a/tests/integration/data/hints/html/zoom_precision.html b/tests/end2end/data/hints/html/zoom_precision.html similarity index 100% rename from tests/integration/data/hints/html/zoom_precision.html rename to tests/end2end/data/hints/html/zoom_precision.html diff --git a/tests/integration/data/hints/iframe.html b/tests/end2end/data/hints/iframe.html similarity index 100% rename from tests/integration/data/hints/iframe.html rename to tests/end2end/data/hints/iframe.html diff --git a/tests/integration/data/hints/iframe_scroll.html b/tests/end2end/data/hints/iframe_scroll.html similarity index 100% rename from tests/integration/data/hints/iframe_scroll.html rename to tests/end2end/data/hints/iframe_scroll.html diff --git a/tests/integration/data/hints/iframe_target.html b/tests/end2end/data/hints/iframe_target.html similarity index 100% rename from tests/integration/data/hints/iframe_target.html rename to tests/end2end/data/hints/iframe_target.html diff --git a/tests/integration/data/hints/issue1393.html b/tests/end2end/data/hints/issue1393.html similarity index 100% rename from tests/integration/data/hints/issue1393.html rename to tests/end2end/data/hints/issue1393.html diff --git a/tests/integration/data/hints/link_blank.html b/tests/end2end/data/hints/link_blank.html similarity index 100% rename from tests/integration/data/hints/link_blank.html rename to tests/end2end/data/hints/link_blank.html diff --git a/tests/integration/data/hints/link_span.html b/tests/end2end/data/hints/link_span.html similarity index 100% rename from tests/integration/data/hints/link_span.html rename to tests/end2end/data/hints/link_span.html diff --git a/tests/integration/data/insert_mode_settings/html/autofocus.html b/tests/end2end/data/insert_mode_settings/html/autofocus.html similarity index 100% rename from tests/integration/data/insert_mode_settings/html/autofocus.html rename to tests/end2end/data/insert_mode_settings/html/autofocus.html diff --git a/tests/integration/data/insert_mode_settings/html/input.html b/tests/end2end/data/insert_mode_settings/html/input.html similarity index 100% rename from tests/integration/data/insert_mode_settings/html/input.html rename to tests/end2end/data/insert_mode_settings/html/input.html diff --git a/tests/integration/data/insert_mode_settings/html/textarea.html b/tests/end2end/data/insert_mode_settings/html/textarea.html similarity index 100% rename from tests/integration/data/insert_mode_settings/html/textarea.html rename to tests/end2end/data/insert_mode_settings/html/textarea.html diff --git a/tests/integration/data/javascript/issue906.html b/tests/end2end/data/javascript/issue906.html similarity index 100% rename from tests/integration/data/javascript/issue906.html rename to tests/end2end/data/javascript/issue906.html diff --git a/tests/integration/data/keyinput/log.html b/tests/end2end/data/keyinput/log.html similarity index 100% rename from tests/integration/data/keyinput/log.html rename to tests/end2end/data/keyinput/log.html diff --git a/tests/integration/data/l33t.txt b/tests/end2end/data/l33t.txt similarity index 100% rename from tests/integration/data/l33t.txt rename to tests/end2end/data/l33t.txt diff --git a/tests/integration/data/marks.html b/tests/end2end/data/marks.html similarity index 100% rename from tests/integration/data/marks.html rename to tests/end2end/data/marks.html diff --git a/tests/integration/data/misc/hello.txt.html b/tests/end2end/data/misc/hello.txt.html similarity index 100% rename from tests/integration/data/misc/hello.txt.html rename to tests/end2end/data/misc/hello.txt.html diff --git a/tests/integration/data/misc/test.pdf b/tests/end2end/data/misc/test.pdf similarity index 100% rename from tests/integration/data/misc/test.pdf rename to tests/end2end/data/misc/test.pdf diff --git a/tests/integration/data/navigate/index.html b/tests/end2end/data/navigate/index.html similarity index 100% rename from tests/integration/data/navigate/index.html rename to tests/end2end/data/navigate/index.html diff --git a/tests/integration/data/navigate/next.html b/tests/end2end/data/navigate/next.html similarity index 100% rename from tests/integration/data/navigate/next.html rename to tests/end2end/data/navigate/next.html diff --git a/tests/integration/data/navigate/prev.html b/tests/end2end/data/navigate/prev.html similarity index 100% rename from tests/integration/data/navigate/prev.html rename to tests/end2end/data/navigate/prev.html diff --git a/tests/integration/data/navigate/sub/index.html b/tests/end2end/data/navigate/sub/index.html similarity index 100% rename from tests/integration/data/navigate/sub/index.html rename to tests/end2end/data/navigate/sub/index.html diff --git a/tests/integration/data/numbers/1.txt b/tests/end2end/data/numbers/1.txt similarity index 100% rename from tests/integration/data/numbers/1.txt rename to tests/end2end/data/numbers/1.txt diff --git a/tests/integration/data/numbers/10.txt b/tests/end2end/data/numbers/10.txt similarity index 100% rename from tests/integration/data/numbers/10.txt rename to tests/end2end/data/numbers/10.txt diff --git a/tests/integration/data/numbers/11.txt b/tests/end2end/data/numbers/11.txt similarity index 100% rename from tests/integration/data/numbers/11.txt rename to tests/end2end/data/numbers/11.txt diff --git a/tests/integration/data/numbers/12.txt b/tests/end2end/data/numbers/12.txt similarity index 100% rename from tests/integration/data/numbers/12.txt rename to tests/end2end/data/numbers/12.txt diff --git a/tests/integration/data/numbers/13.txt b/tests/end2end/data/numbers/13.txt similarity index 100% rename from tests/integration/data/numbers/13.txt rename to tests/end2end/data/numbers/13.txt diff --git a/tests/integration/data/numbers/14.txt b/tests/end2end/data/numbers/14.txt similarity index 100% rename from tests/integration/data/numbers/14.txt rename to tests/end2end/data/numbers/14.txt diff --git a/tests/integration/data/numbers/2.txt b/tests/end2end/data/numbers/2.txt similarity index 100% rename from tests/integration/data/numbers/2.txt rename to tests/end2end/data/numbers/2.txt diff --git a/tests/integration/data/numbers/3.txt b/tests/end2end/data/numbers/3.txt similarity index 100% rename from tests/integration/data/numbers/3.txt rename to tests/end2end/data/numbers/3.txt diff --git a/tests/integration/data/numbers/4.txt b/tests/end2end/data/numbers/4.txt similarity index 100% rename from tests/integration/data/numbers/4.txt rename to tests/end2end/data/numbers/4.txt diff --git a/tests/integration/data/numbers/5.txt b/tests/end2end/data/numbers/5.txt similarity index 100% rename from tests/integration/data/numbers/5.txt rename to tests/end2end/data/numbers/5.txt diff --git a/tests/integration/data/numbers/6.txt b/tests/end2end/data/numbers/6.txt similarity index 100% rename from tests/integration/data/numbers/6.txt rename to tests/end2end/data/numbers/6.txt diff --git a/tests/integration/data/numbers/7.txt b/tests/end2end/data/numbers/7.txt similarity index 100% rename from tests/integration/data/numbers/7.txt rename to tests/end2end/data/numbers/7.txt diff --git a/tests/integration/data/numbers/8.txt b/tests/end2end/data/numbers/8.txt similarity index 100% rename from tests/integration/data/numbers/8.txt rename to tests/end2end/data/numbers/8.txt diff --git a/tests/integration/data/numbers/9.txt b/tests/end2end/data/numbers/9.txt similarity index 100% rename from tests/integration/data/numbers/9.txt rename to tests/end2end/data/numbers/9.txt diff --git a/tests/integration/data/paste_primary.html b/tests/end2end/data/paste_primary.html similarity index 100% rename from tests/integration/data/paste_primary.html rename to tests/end2end/data/paste_primary.html diff --git a/tests/integration/data/prompt/geolocation.html b/tests/end2end/data/prompt/geolocation.html similarity index 100% rename from tests/integration/data/prompt/geolocation.html rename to tests/end2end/data/prompt/geolocation.html diff --git a/tests/integration/data/prompt/jsalert.html b/tests/end2end/data/prompt/jsalert.html similarity index 100% rename from tests/integration/data/prompt/jsalert.html rename to tests/end2end/data/prompt/jsalert.html diff --git a/tests/integration/data/prompt/jsconfirm.html b/tests/end2end/data/prompt/jsconfirm.html similarity index 100% rename from tests/integration/data/prompt/jsconfirm.html rename to tests/end2end/data/prompt/jsconfirm.html diff --git a/tests/integration/data/prompt/jsprompt.html b/tests/end2end/data/prompt/jsprompt.html similarity index 100% rename from tests/integration/data/prompt/jsprompt.html rename to tests/end2end/data/prompt/jsprompt.html diff --git a/tests/integration/data/prompt/notifications.html b/tests/end2end/data/prompt/notifications.html similarity index 100% rename from tests/integration/data/prompt/notifications.html rename to tests/end2end/data/prompt/notifications.html diff --git a/tests/integration/data/reload.txt b/tests/end2end/data/reload.txt similarity index 100% rename from tests/integration/data/reload.txt rename to tests/end2end/data/reload.txt diff --git a/tests/integration/data/scroll.html b/tests/end2end/data/scroll.html similarity index 100% rename from tests/integration/data/scroll.html rename to tests/end2end/data/scroll.html diff --git a/tests/integration/data/search.html b/tests/end2end/data/search.html similarity index 100% rename from tests/integration/data/search.html rename to tests/end2end/data/search.html diff --git a/tests/integration/data/sessions/history_replace_state.html b/tests/end2end/data/sessions/history_replace_state.html similarity index 100% rename from tests/integration/data/sessions/history_replace_state.html rename to tests/end2end/data/sessions/history_replace_state.html diff --git a/tests/integration/data/smart.txt b/tests/end2end/data/smart.txt similarity index 100% rename from tests/integration/data/smart.txt rename to tests/end2end/data/smart.txt diff --git a/tests/integration/data/ssl/cert.csr b/tests/end2end/data/ssl/cert.csr similarity index 100% rename from tests/integration/data/ssl/cert.csr rename to tests/end2end/data/ssl/cert.csr diff --git a/tests/integration/data/ssl/cert.pem b/tests/end2end/data/ssl/cert.pem similarity index 100% rename from tests/integration/data/ssl/cert.pem rename to tests/end2end/data/ssl/cert.pem diff --git a/tests/integration/data/ssl/key.pem b/tests/end2end/data/ssl/key.pem similarity index 100% rename from tests/integration/data/ssl/key.pem rename to tests/end2end/data/ssl/key.pem diff --git a/tests/integration/data/ssl/privkey.pem b/tests/end2end/data/ssl/privkey.pem similarity index 100% rename from tests/integration/data/ssl/privkey.pem rename to tests/end2end/data/ssl/privkey.pem diff --git a/tests/integration/data/title with spaces.html b/tests/end2end/data/title with spaces.html similarity index 100% rename from tests/integration/data/title with spaces.html rename to tests/end2end/data/title with spaces.html diff --git a/tests/integration/data/title.html b/tests/end2end/data/title.html similarity index 100% rename from tests/integration/data/title.html rename to tests/end2end/data/title.html diff --git a/tests/integration/data/userscripts/open_current_url b/tests/end2end/data/userscripts/open_current_url similarity index 100% rename from tests/integration/data/userscripts/open_current_url rename to tests/end2end/data/userscripts/open_current_url diff --git a/tests/integration/data/words.txt b/tests/end2end/data/words.txt similarity index 100% rename from tests/integration/data/words.txt rename to tests/end2end/data/words.txt diff --git a/tests/integration/features/backforward.feature b/tests/end2end/features/backforward.feature similarity index 100% rename from tests/integration/features/backforward.feature rename to tests/end2end/features/backforward.feature diff --git a/tests/integration/features/caret.feature b/tests/end2end/features/caret.feature similarity index 100% rename from tests/integration/features/caret.feature rename to tests/end2end/features/caret.feature diff --git a/tests/integration/features/conftest.py b/tests/end2end/features/conftest.py similarity index 99% rename from tests/integration/features/conftest.py rename to tests/end2end/features/conftest.py index 71424d600..8a611e23a 100644 --- a/tests/integration/features/conftest.py +++ b/tests/end2end/features/conftest.py @@ -130,7 +130,7 @@ def run_command(quteproc, httpbin, command): @bdd.when(bdd.parsers.parse("I execute the userscript {userscript}")) def run_userscript(quteproc, userscript): - """Run a userscript located in tests/integration/data/userscripts. + """Run a userscript located in tests/end2end/data/userscripts. Wrapper around :spawn --userscript {userscript} that uses an absolute path. @@ -345,7 +345,7 @@ def check_header(quteproc, header, value): def check_contents(quteproc, filename): """Check the current page's content. - The filename is interpreted relative to tests/integration/data. + The filename is interpreted relative to tests/end2end/data. """ content = quteproc.get_content(plain=False) path = os.path.join(utils.abs_datapath(), diff --git a/tests/integration/features/downloads.feature b/tests/end2end/features/downloads.feature similarity index 100% rename from tests/integration/features/downloads.feature rename to tests/end2end/features/downloads.feature diff --git a/tests/integration/features/editor.feature b/tests/end2end/features/editor.feature similarity index 100% rename from tests/integration/features/editor.feature rename to tests/end2end/features/editor.feature diff --git a/tests/integration/features/hints.feature b/tests/end2end/features/hints.feature similarity index 100% rename from tests/integration/features/hints.feature rename to tests/end2end/features/hints.feature diff --git a/tests/integration/features/javascript.feature b/tests/end2end/features/javascript.feature similarity index 100% rename from tests/integration/features/javascript.feature rename to tests/end2end/features/javascript.feature diff --git a/tests/integration/features/keyinput.feature b/tests/end2end/features/keyinput.feature similarity index 100% rename from tests/integration/features/keyinput.feature rename to tests/end2end/features/keyinput.feature diff --git a/tests/integration/features/marks.feature b/tests/end2end/features/marks.feature similarity index 100% rename from tests/integration/features/marks.feature rename to tests/end2end/features/marks.feature diff --git a/tests/integration/features/misc.feature b/tests/end2end/features/misc.feature similarity index 100% rename from tests/integration/features/misc.feature rename to tests/end2end/features/misc.feature diff --git a/tests/integration/features/navigate.feature b/tests/end2end/features/navigate.feature similarity index 100% rename from tests/integration/features/navigate.feature rename to tests/end2end/features/navigate.feature diff --git a/tests/integration/features/open.feature b/tests/end2end/features/open.feature similarity index 100% rename from tests/integration/features/open.feature rename to tests/end2end/features/open.feature diff --git a/tests/integration/features/prompts.feature b/tests/end2end/features/prompts.feature similarity index 100% rename from tests/integration/features/prompts.feature rename to tests/end2end/features/prompts.feature diff --git a/tests/integration/features/scroll.feature b/tests/end2end/features/scroll.feature similarity index 100% rename from tests/integration/features/scroll.feature rename to tests/end2end/features/scroll.feature diff --git a/tests/integration/features/search.feature b/tests/end2end/features/search.feature similarity index 100% rename from tests/integration/features/search.feature rename to tests/end2end/features/search.feature diff --git a/tests/integration/features/sessions.feature b/tests/end2end/features/sessions.feature similarity index 100% rename from tests/integration/features/sessions.feature rename to tests/end2end/features/sessions.feature diff --git a/tests/integration/features/set.feature b/tests/end2end/features/set.feature similarity index 100% rename from tests/integration/features/set.feature rename to tests/end2end/features/set.feature diff --git a/tests/integration/features/spawn.feature b/tests/end2end/features/spawn.feature similarity index 100% rename from tests/integration/features/spawn.feature rename to tests/end2end/features/spawn.feature diff --git a/tests/integration/features/tabs.feature b/tests/end2end/features/tabs.feature similarity index 100% rename from tests/integration/features/tabs.feature rename to tests/end2end/features/tabs.feature diff --git a/tests/integration/features/test_backforward.py b/tests/end2end/features/test_backforward_bdd.py similarity index 100% rename from tests/integration/features/test_backforward.py rename to tests/end2end/features/test_backforward_bdd.py diff --git a/tests/integration/features/test_caret.py b/tests/end2end/features/test_caret_bdd.py similarity index 92% rename from tests/integration/features/test_caret.py rename to tests/end2end/features/test_caret_bdd.py index 98b70ade5..611e00610 100644 --- a/tests/integration/features/test_caret.py +++ b/tests/end2end/features/test_caret_bdd.py @@ -20,7 +20,7 @@ import pytest_bdd as bdd # pylint: disable=unused-import -from test_yankpaste import init_fake_clipboard +from end2end.features.test_yankpaste_bdd import init_fake_clipboard bdd.scenarios('caret.feature') diff --git a/tests/integration/features/test_downloads.py b/tests/end2end/features/test_downloads_bdd.py similarity index 100% rename from tests/integration/features/test_downloads.py rename to tests/end2end/features/test_downloads_bdd.py diff --git a/tests/integration/features/test_editor.py b/tests/end2end/features/test_editor_bdd.py similarity index 100% rename from tests/integration/features/test_editor.py rename to tests/end2end/features/test_editor_bdd.py diff --git a/tests/integration/features/test_hints.py b/tests/end2end/features/test_hints_bdd.py similarity index 100% rename from tests/integration/features/test_hints.py rename to tests/end2end/features/test_hints_bdd.py diff --git a/tests/integration/features/test_javascript.py b/tests/end2end/features/test_javascript_bdd.py similarity index 100% rename from tests/integration/features/test_javascript.py rename to tests/end2end/features/test_javascript_bdd.py diff --git a/tests/integration/features/test_keyinput.py b/tests/end2end/features/test_keyinput_bdd.py similarity index 100% rename from tests/integration/features/test_keyinput.py rename to tests/end2end/features/test_keyinput_bdd.py diff --git a/tests/integration/features/test_marks.py b/tests/end2end/features/test_marks_bdd.py similarity index 100% rename from tests/integration/features/test_marks.py rename to tests/end2end/features/test_marks_bdd.py diff --git a/tests/integration/features/test_misc.py b/tests/end2end/features/test_misc_bdd.py similarity index 100% rename from tests/integration/features/test_misc.py rename to tests/end2end/features/test_misc_bdd.py diff --git a/tests/integration/features/test_navigate.py b/tests/end2end/features/test_navigate_bdd.py similarity index 100% rename from tests/integration/features/test_navigate.py rename to tests/end2end/features/test_navigate_bdd.py diff --git a/tests/integration/features/test_open.py b/tests/end2end/features/test_open_bdd.py similarity index 100% rename from tests/integration/features/test_open.py rename to tests/end2end/features/test_open_bdd.py diff --git a/tests/integration/features/test_prompts.py b/tests/end2end/features/test_prompts_bdd.py similarity index 100% rename from tests/integration/features/test_prompts.py rename to tests/end2end/features/test_prompts_bdd.py diff --git a/tests/integration/features/test_scroll.py b/tests/end2end/features/test_scroll_bdd.py similarity index 100% rename from tests/integration/features/test_scroll.py rename to tests/end2end/features/test_scroll_bdd.py diff --git a/tests/integration/features/test_search.py b/tests/end2end/features/test_search_bdd.py similarity index 92% rename from tests/integration/features/test_search.py rename to tests/end2end/features/test_search_bdd.py index 45d00e818..a2f94f569 100644 --- a/tests/integration/features/test_search.py +++ b/tests/end2end/features/test_search_bdd.py @@ -20,7 +20,7 @@ import pytest_bdd as bdd # pylint: disable=unused-import -from test_yankpaste import init_fake_clipboard +from end2end.features.test_yankpaste_bdd import init_fake_clipboard bdd.scenarios('search.feature') diff --git a/tests/integration/features/test_sessions.py b/tests/end2end/features/test_sessions_bdd.py similarity index 100% rename from tests/integration/features/test_sessions.py rename to tests/end2end/features/test_sessions_bdd.py diff --git a/tests/integration/features/test_set.py b/tests/end2end/features/test_set_bdd.py similarity index 100% rename from tests/integration/features/test_set.py rename to tests/end2end/features/test_set_bdd.py diff --git a/tests/integration/features/test_spawn.py b/tests/end2end/features/test_spawn_bdd.py similarity index 100% rename from tests/integration/features/test_spawn.py rename to tests/end2end/features/test_spawn_bdd.py diff --git a/tests/integration/features/test_tabs.py b/tests/end2end/features/test_tabs_bdd.py similarity index 100% rename from tests/integration/features/test_tabs.py rename to tests/end2end/features/test_tabs_bdd.py diff --git a/tests/integration/features/test_urlmarks.py b/tests/end2end/features/test_urlmarks_bdd.py similarity index 100% rename from tests/integration/features/test_urlmarks.py rename to tests/end2end/features/test_urlmarks_bdd.py diff --git a/tests/integration/features/test_userscripts_bdd.py b/tests/end2end/features/test_userscripts_bdd.py similarity index 100% rename from tests/integration/features/test_userscripts_bdd.py rename to tests/end2end/features/test_userscripts_bdd.py diff --git a/tests/integration/features/test_yankpaste.py b/tests/end2end/features/test_yankpaste_bdd.py similarity index 100% rename from tests/integration/features/test_yankpaste.py rename to tests/end2end/features/test_yankpaste_bdd.py diff --git a/tests/integration/features/test_zoom.py b/tests/end2end/features/test_zoom_bdd.py similarity index 100% rename from tests/integration/features/test_zoom.py rename to tests/end2end/features/test_zoom_bdd.py diff --git a/tests/integration/features/urlmarks.feature b/tests/end2end/features/urlmarks.feature similarity index 100% rename from tests/integration/features/urlmarks.feature rename to tests/end2end/features/urlmarks.feature diff --git a/tests/integration/features/userscripts.feature b/tests/end2end/features/userscripts.feature similarity index 100% rename from tests/integration/features/userscripts.feature rename to tests/end2end/features/userscripts.feature diff --git a/tests/integration/features/yankpaste.feature b/tests/end2end/features/yankpaste.feature similarity index 100% rename from tests/integration/features/yankpaste.feature rename to tests/end2end/features/yankpaste.feature diff --git a/tests/integration/features/zoom.feature b/tests/end2end/features/zoom.feature similarity index 100% rename from tests/integration/features/zoom.feature rename to tests/end2end/features/zoom.feature diff --git a/tests/integration/quteprocess.py b/tests/end2end/fixtures/quteprocess.py similarity index 99% rename from tests/integration/quteprocess.py rename to tests/end2end/fixtures/quteprocess.py index d4c7a785a..0dbd45a7e 100644 --- a/tests/integration/quteprocess.py +++ b/tests/end2end/fixtures/quteprocess.py @@ -34,11 +34,11 @@ import yaml import pytest from PyQt5.QtCore import pyqtSignal, QUrl -import testprocess from qutebrowser.misc import ipc from qutebrowser.utils import log, utils from qutebrowser.browser import webelem from helpers import utils as testutils +from end2end.fixtures import testprocess instance_counter = itertools.count() diff --git a/tests/integration/test_quteprocess.py b/tests/end2end/fixtures/test_quteprocess.py similarity index 99% rename from tests/integration/test_quteprocess.py rename to tests/end2end/fixtures/test_quteprocess.py index 9fff02f27..06a020352 100644 --- a/tests/integration/test_quteprocess.py +++ b/tests/end2end/fixtures/test_quteprocess.py @@ -24,8 +24,7 @@ import datetime import pytest -import quteprocess -import testprocess +from end2end.fixtures import quteprocess, testprocess from qutebrowser.utils import log diff --git a/tests/integration/test_testprocess.py b/tests/end2end/fixtures/test_testprocess.py similarity index 99% rename from tests/integration/test_testprocess.py rename to tests/end2end/fixtures/test_testprocess.py index 8a42717f1..4ead5f238 100644 --- a/tests/integration/test_testprocess.py +++ b/tests/end2end/fixtures/test_testprocess.py @@ -27,7 +27,7 @@ import datetime import pytest from PyQt5.QtCore import QProcess -import testprocess +from end2end.fixtures import testprocess pytestmark = [pytest.mark.not_frozen] diff --git a/tests/integration/test_webserver.py b/tests/end2end/fixtures/test_webserver.py similarity index 100% rename from tests/integration/test_webserver.py rename to tests/end2end/fixtures/test_webserver.py diff --git a/tests/integration/testprocess.py b/tests/end2end/fixtures/testprocess.py similarity index 100% rename from tests/integration/testprocess.py rename to tests/end2end/fixtures/testprocess.py diff --git a/tests/integration/webserver.py b/tests/end2end/fixtures/webserver.py similarity index 99% rename from tests/integration/webserver.py rename to tests/end2end/fixtures/webserver.py index fc06a49b3..5d1e3f99f 100644 --- a/tests/integration/webserver.py +++ b/tests/end2end/fixtures/webserver.py @@ -29,7 +29,7 @@ import http.client import pytest from PyQt5.QtCore import pyqtSignal, QUrl -import testprocess +from end2end.fixtures import testprocess class Request(testprocess.Line): diff --git a/tests/integration/webserver_sub.py b/tests/end2end/fixtures/webserver_sub.py similarity index 92% rename from tests/integration/webserver_sub.py rename to tests/end2end/fixtures/webserver_sub.py index a20a89b57..aef4186d7 100644 --- a/tests/integration/webserver_sub.py +++ b/tests/end2end/fixtures/webserver_sub.py @@ -17,9 +17,9 @@ # You should have received a copy of the GNU General Public License # along with qutebrowser. If not, see . -"""httpbin web server for integration tests. +"""httpbin web server for end2end tests. -This script gets called as a QProcess from integration/conftest.py. +This script gets called as a QProcess from end2end/conftest.py. """ import sys @@ -46,9 +46,9 @@ def send_data(path): """ if hasattr(sys, 'frozen'): basedir = os.path.realpath(os.path.dirname(sys.executable)) - data_dir = os.path.join(basedir, 'integration', 'data') + data_dir = os.path.join(basedir, 'end2end', 'data') else: - basedir = os.path.realpath(os.path.dirname(__file__)) + basedir = os.path.join(os.path.realpath(os.path.dirname(__file__)), '..') data_dir = os.path.join(basedir, 'data') print(basedir) if os.path.isdir(os.path.join(data_dir, path)): @@ -129,7 +129,7 @@ class WSGIServer(cherrypy.wsgiserver.CherryPyWSGIServer): def main(): if hasattr(sys, 'frozen'): basedir = os.path.realpath(os.path.dirname(sys.executable)) - app.template_folder = os.path.join(basedir, 'integration', 'templates') + app.template_folder = os.path.join(basedir, 'end2end', 'templates') port = int(sys.argv[1]) server = WSGIServer(('127.0.0.1', port), app) diff --git a/tests/integration/webserver_sub_ssl.py b/tests/end2end/fixtures/webserver_sub_ssl.py similarity index 94% rename from tests/integration/webserver_sub_ssl.py rename to tests/end2end/fixtures/webserver_sub_ssl.py index 98869b264..bb945745e 100644 --- a/tests/integration/webserver_sub_ssl.py +++ b/tests/end2end/fixtures/webserver_sub_ssl.py @@ -19,7 +19,7 @@ """Minimal flask webserver serving a Hello World via SSL. -This script gets called as a QProcess from integration/conftest.py. +This script gets called as a QProcess from end2end/conftest.py. """ import ssl @@ -53,7 +53,7 @@ def turn_off_logging(): def main(): ssl_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), - 'data', 'ssl') + '..', 'data', 'ssl') # WORKAROUND for https://github.com/PyCQA/pylint/issues/399 # pylint: disable=no-member, useless-suppression context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) diff --git a/tests/integration/test_dirbrowser.py b/tests/end2end/test_dirbrowser.py similarity index 100% rename from tests/integration/test_dirbrowser.py rename to tests/end2end/test_dirbrowser.py diff --git a/tests/integration/test_hints_html.py b/tests/end2end/test_hints_html.py similarity index 100% rename from tests/integration/test_hints_html.py rename to tests/end2end/test_hints_html.py diff --git a/tests/integration/test_insert_mode.py b/tests/end2end/test_insert_mode.py similarity index 100% rename from tests/integration/test_insert_mode.py rename to tests/end2end/test_insert_mode.py diff --git a/tests/integration/test_invocations.py b/tests/end2end/test_invocations.py similarity index 100% rename from tests/integration/test_invocations.py rename to tests/end2end/test_invocations.py diff --git a/tests/integration/test_mhtml_e2e.py b/tests/end2end/test_mhtml_e2e.py similarity index 100% rename from tests/integration/test_mhtml_e2e.py rename to tests/end2end/test_mhtml_e2e.py diff --git a/tests/integration/test_smoke.py b/tests/end2end/test_smoke.py similarity index 100% rename from tests/integration/test_smoke.py rename to tests/end2end/test_smoke.py diff --git a/tests/helpers/utils.py b/tests/helpers/utils.py index eba5fc0f5..2ca7aa6f2 100644 --- a/tests/helpers/utils.py +++ b/tests/helpers/utils.py @@ -159,10 +159,6 @@ def pattern_match(*, pattern, value): def abs_datapath(): - """Get the absolute path to the integration data directory. - - Return: - The absolute path to the tests/integration/data directory. - """ + """Get the absolute path to the end2end data directory.""" file_abs = os.path.abspath(os.path.dirname(__file__)) - return os.path.join(file_abs, '..', 'integration', 'data') + return os.path.join(file_abs, '..', 'end2end', 'data') diff --git a/tests/unit/misc/test_editor_unit.py b/tests/unit/misc/test_editor.py similarity index 100% rename from tests/unit/misc/test_editor_unit.py rename to tests/unit/misc/test_editor.py diff --git a/tests/unit/misc/test_sessions_unit.py b/tests/unit/misc/test_sessions.py similarity index 100% rename from tests/unit/misc/test_sessions_unit.py rename to tests/unit/misc/test_sessions.py