diff options
author | Florian Bruhin <git@the-compiler.org> | 2016-07-26 12:40:31 +0200 |
---|---|---|
committer | Florian Bruhin <git@the-compiler.org> | 2016-07-26 12:51:12 +0200 |
commit | 214641301c96e07854b68e9e344ab022fd0a8ea2 (patch) | |
tree | 5e8107d9e7c5b0b51a89291800c021b5a414abd2 | |
parent | 7f9af096cd13d588b60b359d94acb2cff2dcf63c (diff) | |
download | qutebrowser-214641301c96e07854b68e9e344ab022fd0a8ea2.tar.gz qutebrowser-214641301c96e07854b68e9e344ab022fd0a8ea2.zip |
Improve test_smoke
There's currently an error on exit which doesn't get caught with
--nowindow and not with ":later 500 quit".
We also need to check the output as there's an additional segfault when
that happens...
-rw-r--r-- | tests/end2end/test_smoke.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/end2end/test_smoke.py b/tests/end2end/test_smoke.py index cb4b600dc..1a579cc02 100644 --- a/tests/end2end/test_smoke.py +++ b/tests/end2end/test_smoke.py @@ -26,18 +26,20 @@ import signal import pytest - -def test_smoke(): +@pytest.mark.parametrize('cmd', [':quit', ':later 500 quit']) +def test_smoke(cmd, capfd): if hasattr(sys, 'frozen'): argv = [os.path.join(os.path.dirname(sys.executable), 'qutebrowser')] else: argv = [sys.executable, '-m', 'qutebrowser'] - argv += ['--debug', '--no-err-windows', '--nowindow', '--temp-basedir', - 'about:blank', ':later 500 quit'] + argv += ['--debug', '--no-err-windows', '--temp-basedir', 'about:blank', + cmd] try: subprocess.check_call(argv) except subprocess.CalledProcessError as e: if e.returncode == -signal.SIGSEGV: + _out, err = capfd.readouterr() + assert 'Uncaught exception' not in err # pylint: disable=no-member # https://github.com/The-Compiler/qutebrowser/issues/1387 pytest.xfail("Ignoring segfault on exit...") |