test_qtquick.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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_qtquick():
  6. """Test the qtpy.QtQuick namespace"""
  7. from qtpy import QtQuick
  8. assert QtQuick.QQuickAsyncImageProvider is not None
  9. if not PYSIDE2:
  10. assert QtQuick.QQuickCloseEvent is not None
  11. assert QtQuick.QQuickFramebufferObject is not None
  12. assert QtQuick.QQuickImageProvider is not None
  13. assert QtQuick.QQuickImageResponse is not None
  14. assert QtQuick.QQuickItem is not None
  15. assert QtQuick.QQuickItemGrabResult is not None
  16. assert QtQuick.QQuickPaintedItem is not None
  17. assert QtQuick.QQuickRenderControl is not None
  18. assert QtQuick.QQuickTextDocument is not None
  19. assert QtQuick.QQuickTextureFactory is not None
  20. assert QtQuick.QQuickView is not None
  21. assert QtQuick.QQuickWindow is not None
  22. assert QtQuick.QSGAbstractRenderer is not None
  23. assert QtQuick.QSGBasicGeometryNode is not None
  24. assert QtQuick.QSGClipNode is not None
  25. assert QtQuick.QSGDynamicTexture is not None
  26. assert QtQuick.QSGEngine is not None
  27. if not PYSIDE2:
  28. assert QtQuick.QSGFlatColorMaterial is not None
  29. assert QtQuick.QSGGeometry is not None
  30. assert QtQuick.QSGGeometryNode is not None
  31. #assert QtQuick.QSGImageNode is not None
  32. if not PYSIDE2:
  33. assert QtQuick.QSGMaterial is not None
  34. assert QtQuick.QSGMaterialShader is not None
  35. assert QtQuick.QSGMaterialType is not None
  36. assert QtQuick.QSGNode is not None
  37. assert QtQuick.QSGOpacityNode is not None
  38. if not PYSIDE2:
  39. assert QtQuick.QSGOpaqueTextureMaterial is not None
  40. #assert QtQuick.QSGRectangleNode is not None
  41. #assert QtQuick.QSGRenderNode is not None
  42. #assert QtQuick.QSGRendererInterface is not None
  43. assert QtQuick.QSGSimpleRectNode is not None
  44. assert QtQuick.QSGSimpleTextureNode is not None
  45. assert QtQuick.QSGTexture is not None
  46. if not PYSIDE2:
  47. assert QtQuick.QSGTextureMaterial is not None
  48. assert QtQuick.QSGTextureProvider is not None
  49. assert QtQuick.QSGTransformNode is not None
  50. if not PYSIDE2:
  51. assert QtQuick.QSGVertexColorMaterial is not None