summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/QtCore/bug_829.conf2
-rw-r--r--tests/QtCore/bug_829.py11
2 files changed, 8 insertions, 5 deletions
diff --git a/tests/QtCore/bug_829.conf b/tests/QtCore/bug_829.conf
deleted file mode 100644
index 90da1ee5..00000000
--- a/tests/QtCore/bug_829.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-[General]
-x=@Variant(\0\0\0\x7f\0\0\0\x18PySide::PyObjectWrapper\0\0\0\0\x12(dp0\nI1\nS'a'\np1\ns.)
diff --git a/tests/QtCore/bug_829.py b/tests/QtCore/bug_829.py
index a805d876..da527ad4 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__':