diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-04-01 19:25:00 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2010-04-05 14:36:06 -0300 |
commit | 9b338f98571bd2d0433564014af3cf18e87788bd (patch) | |
tree | 84aa4e4a9471d739e4584df2888a60166d95e051 /tests | |
parent | 956d6fd530a5c1c526dc64a357addd790ab87c12 (diff) |
QVariant.toList returns a list when it contains a python sequence.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/qtcore/qvariant_test.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qtcore/qvariant_test.py b/tests/qtcore/qvariant_test.py index d1823eea0..5c23b4049 100644 --- a/tests/qtcore/qvariant_test.py +++ b/tests/qtcore/qvariant_test.py @@ -131,6 +131,11 @@ class QVariantConstructor(unittest.TestCase): self.assertEqual(variant.type(), QVariant.Size) self.assertEqual(variant.toSize(), mysize) + def testToList(self): + v = QVariant((1,2,3)) + self.assertEqual(v.toList(), (1, 2, 3)) + v = QVariant([0,1,2]) + self.assertEqual(v.toList(), [0, 1, 2]) if __name__ == '__main__': unittest.main() |