aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pysidetest/list_signal_test.py
blob: 36d3c21d20e530171da0c842cbecf1e0391924a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# -*- coding: utf-8 -*-

import unittest
from testbinding import TestObject
from PySide.QtCore import QObject

class ListConnectionTest(unittest.TestCase):

    def childrenChanged(self, children):
        self._child = children[0]

    def testConnection(self):
        o = TestObject(0)
        c = QObject()
        c.setObjectName("child")
        self._child = None
        o.childrenChanged.connect(self.childrenChanged)
        o.addChild(c)
        self.assertEquals(self._child.objectName(), "child")

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