skip integration test in CI

This commit is contained in:
Dima Gerasimov 2019-06-29 19:05:56 +01:00 committed by Dmitrii Gerasimov
parent a7caf6c0f5
commit 7e9873c4cf

View file

@ -5,7 +5,9 @@ from contextlib import contextmanager
from tempfile import TemporaryDirectory from tempfile import TemporaryDirectory
import re import re
import json import json
import os
import pytest # type: ignore
from selenium import webdriver # type: ignore from selenium import webdriver # type: ignore
@ -15,6 +17,10 @@ from test_grasp import grasp_test_server
addon_path = (Path(__file__).parent.parent / 'build').absolute() addon_path = (Path(__file__).parent.parent / 'build').absolute()
def skip_if_ci(reason):
return pytest.mark.skipif('CI' in os.environ, reason=reason)
@contextmanager @contextmanager
def get_webdriver(): def get_webdriver():
with TemporaryDirectory() as td: with TemporaryDirectory() as td:
@ -82,6 +88,7 @@ def trigger_grasp():
pyautogui.hotkey('ctrl', 'alt', 'c') pyautogui.hotkey('ctrl', 'alt', 'c')
@skip_if_ci('no GUI to run the browser..')
def test(tmp_path: Path): def test(tmp_path: Path):
capture_file = tmp_path / 'output.org' capture_file = tmp_path / 'output.org'
port = '17777' port = '17777'