aboutsummaryrefslogtreecommitdiffstats
path: root/tests/QtCore/bug_829.py
blob: a805d8765c484a969540b5ca7036c0eab92d1311 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Test case for PySide bug 829
# Thomas Perl <thp.io/about>; 2011-04-16

import unittest
from PySide.QtCore import QSettings
from helper import adjust_filename

class QVariantConversions(unittest.TestCase):
    def testDictionary(self):
        s = QSettings(adjust_filename('bug_829.conf', __file__), QSettings.IniFormat)
        #Save value 
        s.setValue('x', {1: 'a'})
        s.sync()
        #Restore value
        self.assertEqual(s.value('x'), {1: 'a'})

if __name__ == '__main__':
    unittest.main()