예제 #1
0
파일: test_Clock.py 프로젝트: bbc/pydvbcss
    def test_setParentNoChangeNoNotify(self):
        a = self.newSysClock(tickRate=1000)
        b = CorrelatedClock(a, 1000, correlation=Correlation(0, 0))
        c = CorrelatedClock(a, 1000, correlation=Correlation(10, 0))
        d = MockDependent()
        b.bind(d)

        d.assertNotNotified()
        b.setParent(a)
        d.assertNotNotified()
        self.assertEquals(b.getParent(), a)
예제 #2
0
파일: test_Clock.py 프로젝트: bbc/pydvbcss
    def test_setParent(self):
        a = self.newSysClock(tickRate=1000)
        b = CorrelatedClock(a, 1000, correlation=Correlation(0, 0))
        c = CorrelatedClock(a, 1000, correlation=Correlation(10, 0))
        d = MockDependent()
        b.bind(d)

        d.assertNotNotified()
        b.setParent(c)
        d.assertNotificationsEqual([b])
        self.assertEquals(b.getParent(), c)