Created unit test for bug 829.

Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
          Hugo Parente Lima <hugo.pl@gmail.com>
This commit is contained in:
Renato Filho 2011-04-27 15:03:43 -03:00 committed by Hugo Parente Lima
commit 8eb96fc200
3 changed files with 21 additions and 0 deletions

18
tests/QtCore/bug_829.py Normal file
View file

@ -0,0 +1,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()