Ejemplo n.º 1
0
def pytest_configure(config):
    webengine_arg = config.getoption('--qute-bdd-webengine')
    webengine_env = os.environ.get('QUTE_BDD_WEBENGINE', '')
    config.webengine = bool(webengine_arg or webengine_env)
    # Fail early if QtWebEngine is not available
    if config.webengine:
        import PyQt5.QtWebEngineWidgets

    try:
        # Added in sip 4.19.4
        sip.enableoverflowchecking(True)
    except AttributeError:
        pass
Ejemplo n.º 2
0
def pytest_configure(config):
    webengine_arg = config.getoption('--qute-bdd-webengine')
    webengine_env = os.environ.get('QUTE_BDD_WEBENGINE', '')
    config.webengine = bool(webengine_arg or webengine_env)
    # Fail early if QtWebEngine is not available
    # pylint: disable=unused-variable
    if config.webengine:
        import PyQt5.QtWebEngineWidgets

    try:
        # Added in sip 4.19.4
        sip.enableoverflowchecking(True)
    except AttributeError:
        pass
Ejemplo n.º 3
0
def configure_pyqt():
    """Remove the PyQt input hook and enable overflow checking.

    Doing this means we can't use the interactive shell anymore (which we don't
    anyways), but we can use pdb instead.
    """
    from PyQt5.QtCore import pyqtRemoveInputHook
    pyqtRemoveInputHook()

    from qutebrowser.qt import sip
    try:
        # Added in sip 4.19.4
        sip.enableoverflowchecking(True)
    except AttributeError:
        pass
Ejemplo n.º 4
0
def configure_pyqt():
    """Remove the PyQt input hook and enable overflow checking.

    Doing this means we can't use the interactive shell anymore (which we don't
    anyways), but we can use pdb instead.
    """
    from PyQt5.QtCore import pyqtRemoveInputHook
    pyqtRemoveInputHook()

    from qutebrowser.qt import sip
    try:
        # Added in sip 4.19.4
        sip.enableoverflowchecking(True)
    except AttributeError:
        pass
Ejemplo n.º 5
0
def configure_pyqt():
    """Remove the PyQt input hook and enable overflow checking.

    Doing this means we can't use the interactive shell anymore (which we don't
    anyways), but we can use pdb instead.
    """
    from PyQt5 import QtCore
    QtCore.pyqtRemoveInputHook()
    try:
        QtCore.pyqt5_enable_new_onexit_scheme(True)  # type: ignore[attr-defined]
    except AttributeError:
        # Added in PyQt 5.13 somewhere, going to be the default in 5.14
        pass

    from qutebrowser.qt import sip
    sip.enableoverflowchecking(True)