def test_base_binding_force(self): t = TestTarget() c = ObservableCollection(1,2,3,4,5,6,7,8,9,10) t << c c._Internal_Collection = ['a','b','c'] c.update_bindings() assert t.Values == ('a','b','c')
def test_base_binding_force(self): t = TestTarget() c = ObservableCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) t << c c._Internal_Collection = ['a', 'b', 'c'] c.update_bindings() assert t.Values == ('a', 'b', 'c')
def test_base_binding_force(self): t = TestTarget() c = ObservableCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) t < bind() < c c._internal_collection = ['a', 'b', 'c'] # don't do this in practice! c.update_bindings() assert t.values == ('a', 'b', 'c')
def test_base_binding_sort(self): t = TestTarget() c = ObservableCollection(1,2,3,4,5,6,7,8,9,10) t << c c.update_bindings() assert t.Values == (1,2,3,4,5,6,7,8,9,10) c.sort(reverse=True) assert t.Values == (10,9,8,7,6,5,4,3,2,1)
def test_base_binding_clear(self): t = TestTarget() c = ObservableCollection(1,2,3,4,5,6,7,8,9,10) t << c c.update_bindings() assert t.Values == (1,2,3,4,5,6,7,8,9,10) c.clear() assert t.Values == ()
def test_base_binding_sort(self): t = TestTarget() c = ObservableCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) t << c c.update_bindings() assert t.Values == (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) c.sort(reverse=True) assert t.Values == (10, 9, 8, 7, 6, 5, 4, 3, 2, 1)
def test_base_binding_clear(self): t = TestTarget() c = ObservableCollection(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) t << c c.update_bindings() assert t.Values == (1, 2, 3, 4, 5, 6, 7, 8, 9, 10) c.clear() assert t.Values == ()