test_qtqml.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. from __future__ import absolute_import
  2. import pytest
  3. from qtpy import PYQT5, PYSIDE2
  4. @pytest.mark.skipif(not (PYQT5 or PYSIDE2), reason="Only available in Qt5 bindings")
  5. def test_qtqml():
  6. """Test the qtpy.QtQml namespace"""
  7. from qtpy import QtQml
  8. assert QtQml.QJSEngine is not None
  9. assert QtQml.QJSValue is not None
  10. assert QtQml.QJSValueIterator is not None
  11. assert QtQml.QQmlAbstractUrlInterceptor is not None
  12. assert QtQml.QQmlApplicationEngine is not None
  13. assert QtQml.QQmlComponent is not None
  14. assert QtQml.QQmlContext is not None
  15. assert QtQml.QQmlEngine is not None
  16. assert QtQml.QQmlImageProviderBase is not None
  17. assert QtQml.QQmlError is not None
  18. assert QtQml.QQmlExpression is not None
  19. assert QtQml.QQmlExtensionPlugin is not None
  20. assert QtQml.QQmlFileSelector is not None
  21. assert QtQml.QQmlIncubationController is not None
  22. assert QtQml.QQmlIncubator is not None
  23. if not PYSIDE2:
  24. # https://wiki.qt.io/Qt_for_Python_Missing_Bindings#QtQml
  25. assert QtQml.QQmlListProperty is not None
  26. assert QtQml.QQmlListReference is not None
  27. assert QtQml.QQmlNetworkAccessManagerFactory is not None
  28. assert QtQml.QQmlParserStatus is not None
  29. assert QtQml.QQmlProperty is not None
  30. assert QtQml.QQmlPropertyValueSource is not None
  31. assert QtQml.QQmlScriptString is not None
  32. assert QtQml.QQmlPropertyMap is not None