diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-10-20 15:46:22 -0200 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:56:14 -0300 |
commit | 2e1ff21938a1513e95d9d7c6bcfdba79b3ee74cd (patch) | |
tree | 002816361fcf439dc5504e9d14984e604bea1534 /tests/QtCore/bug_829.py | |
parent | 0971ac7c4ff368e0f003a772b9701666c9ac17b0 (diff) |
Fix unit test of bug 829.ps-1.0.8
Diffstat (limited to 'tests/QtCore/bug_829.py')
-rw-r--r-- | tests/QtCore/bug_829.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/QtCore/bug_829.py b/tests/QtCore/bug_829.py index a805d8765..da527ad49 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__': |