summaryrefslogtreecommitdiffstats
path: root/tests/QtCore/bug_829.py
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-10-20 15:46:22 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-10-20 15:51:12 -0200
commit69e2171fa162b7f2bea4b505d9d247da14e608d9 (patch)
tree8962468e4918fe559b75b9d9d1dc7ce8984fc6df /tests/QtCore/bug_829.py
parentfee6535a73ba089761e7020647172ef6203113e4 (diff)
downloadpyside-1.0.8.tar.gz
pyside-1.0.8.tar.xz
pyside-1.0.8.zip
Fix unit test of bug 829.1.0.8
Diffstat (limited to 'tests/QtCore/bug_829.py')
-rw-r--r--tests/QtCore/bug_829.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/QtCore/bug_829.py b/tests/QtCore/bug_829.py
index a805d87..da527ad 100644
--- a/tests/QtCore/bug_829.py
+++ b/tests/QtCore/bug_829.py
@@ -4,14 +4,19 @@
import unittest
from PySide.QtCore import QSettings
from helper import adjust_filename
+import tempfile
class QVariantConversions(unittest.TestCase):
def testDictionary(self):
- s = QSettings(adjust_filename('bug_829.conf', __file__), QSettings.IniFormat)
- #Save value
+ confFile = tempfile.NamedTemporaryFile()
+ s = QSettings(confFile.name, QSettings.IniFormat)
+ # Save value
s.setValue('x', {1: 'a'})
s.sync()
- #Restore value
+ del s
+
+ # Restore value
+ s = QSettings(confFile.name, QSettings.IniFormat)
self.assertEqual(s.value('x'), {1: 'a'})
if __name__ == '__main__':