summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-01-28 19:15:06 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-01-28 20:44:16 -0200
commite17795d35b6ce7a65ff55d1c5553b2488d45afa9 (patch)
tree64c4a16174002241028bd03ddaae611b0a10eae4
parent2a4391902406552815140f4ebe078f9f7e9a955c (diff)
downloadpyside-e17795d35b6ce7a65ff55d1c5553b2488d45afa9.tar.gz
pyside-e17795d35b6ce7a65ff55d1c5553b2488d45afa9.tar.xz
pyside-e17795d35b6ce7a65ff55d1c5553b2488d45afa9.zip
Added test for bug 613.
-rw-r--r--tests/QtSvg/CMakeLists.txt1
-rw-r--r--tests/QtSvg/qsvgrenderer_test.py24
2 files changed, 25 insertions, 0 deletions
diff --git a/tests/QtSvg/CMakeLists.txt b/tests/QtSvg/CMakeLists.txt
index 82d3342..4f5e280 100644
--- a/tests/QtSvg/CMakeLists.txt
+++ b/tests/QtSvg/CMakeLists.txt
@@ -1,2 +1,3 @@
PYSIDE_TEST(qsvggenerator_test.py)
+PYSIDE_TEST(qsvgrenderer_test.py)
PYSIDE_TEST(qsvgwidget_test.py)
diff --git a/tests/QtSvg/qsvgrenderer_test.py b/tests/QtSvg/qsvgrenderer_test.py
new file mode 100644
index 0000000..b2c9653
--- /dev/null
+++ b/tests/QtSvg/qsvgrenderer_test.py
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+import unittest, os
+from PySide.QtCore import *
+from PySide.QtGui import *
+from PySide.QtSvg import *
+
+class QSvgRendererTest(unittest.TestCase):
+
+ def testLoad(self):
+ tigerPath = os.path.join(os.path.dirname(__file__), 'tiger.svg')
+ app = QApplication([])
+
+ fromFile = QSvgRenderer(tigerPath)
+ self.assertTrue(fromFile.isValid())
+
+ tigerFile = QFile(tigerPath)
+ tigerFile.open(QFile.ReadOnly)
+ tigerData = tigerFile.readAll()
+ fromContents = QSvgRenderer(tigerData)
+ self.assertTrue(fromContents.isValid())
+
+if __name__ == '__main__':
+ unittest.main()
+