예제 #1
0
 def test_base_binding(self):
     t = TestTarget()
     c = ViewCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
     t < bind() < c
     t.update_bindings()
     assert t.values == (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
예제 #2
0
 def test_ViewChanged(self):
     v = ViewCollection(5, 8, 2, synchronous=True)
     t = self.Tester()
     v.onViewChanged += t.handle_event
     v.update_filter(lambda x: x < 5)
     assert t.kwargs['collection'] == v