summaryrefslogtreecommitdiffstats
path: root/tests/QtSvg/qsvgwidget_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/QtSvg/qsvgwidget_test.py')
-rw-r--r--tests/QtSvg/qsvgwidget_test.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/QtSvg/qsvgwidget_test.py b/tests/QtSvg/qsvgwidget_test.py
new file mode 100644
index 0000000..4afbce9
--- /dev/null
+++ b/tests/QtSvg/qsvgwidget_test.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+import unittest, os
+from PySide.QtCore import *
+from PySide.QtGui import *
+from PySide.QtSvg import *
+
+class QSvgWidgetTest(unittest.TestCase):
+
+ def testLoad(self):
+ tigerPath = os.path.join(os.path.dirname(__file__), 'tiger.svg')
+
+ app = QApplication([])
+ fromFile = QSvgWidget()
+ fromFile.load(tigerPath)
+ self.assertTrue(fromFile.renderer().isValid())
+
+ tigerFile = QFile(tigerPath)
+ tigerFile.open(QFile.ReadOnly)
+ tigerData = tigerFile.readAll()
+ fromContents = QSvgWidget()
+ fromContents.load(tigerData)
+ self.assertTrue(fromContents.renderer().isValid())
+
+if __name__ == '__main__':
+ unittest.main()
+