def test_ansc_does_not_raise_if_no_subcomponent_changed(root): c2 = Component() root.component += c2 c2.changed = False root.component.assert_no_subcomponent_changes()
def test_assert_no_changes_recursive_raises(root): c2 = Component() root.component += c2 c2.changed = True with pytest.raises(batou.UpdateNeeded): root.component.assert_no_changes()
def test_ansc_raises_if_subcomponent_changed(root): c2 = Component() root.component += c2 c2.changed = True with pytest.raises(batou.UpdateNeeded): root.component.assert_no_subcomponent_changes()