Skip to content

Commit

Permalink
Add QtHelp Wrapper.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlaverde committed Aug 17, 2017
1 parent 02894a0 commit 77407aa
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
24 changes: 24 additions & 0 deletions qtpy/QtHelp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
#
# Copyright © 2009- The Spyder Development Team
#
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)

"""QtHelp Wrapper."""

from . import PYQT5
from . import PYQT4
from . import PYSIDE
from . import PYSIDE2

if PYQT5:
from PyQt5.QtHelp import *
elif PYSIDE2:
# Current wheels don't have this module
# from PySide2.QtHelp
pass
elif PYQT4:
from PyQt4.QtHelp import *
elif PYSIDE:
from PySide.QtHelp import *
22 changes: 22 additions & 0 deletions qtpy/tests/test_qthelp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""Test for QtHelp namespace."""

from __future__ import absolute_import

import pytest
from qtpy import PYSIDE2, QtHelp


@pytest.mark.skipif(PYSIDE2, reason="QtHelp bind is missing in PySide2")
def test_qthelp():
"""Test the qtpy.QtHelp namespace."""
assert QtHelp.QHelpContentItem is not None
assert QtHelp.QHelpContentModel is not None
assert QtHelp.QHelpContentWidget is not None
assert QtHelp.QHelpEngine is not None
assert QtHelp.QHelpEngineCore is not None
assert QtHelp.QHelpIndexModel is not None
assert QtHelp.QHelpIndexWidget is not None
assert QtHelp.QHelpSearchEngine is not None
assert QtHelp.QHelpSearchQuery is not None
assert QtHelp.QHelpSearchQueryWidget is not None
assert QtHelp.QHelpSearchResultWidget is not None

0 comments on commit 77407aa

Please sign in to comment.