def test_changed_flag(self): """Check that changed flag works correctly.""" graphic = Graphic(etree.parse("arrow.svg").getroot()) graphic.reset_changed_flag() graphic.set_mirror_x(True) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_mirror_x(False) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_scale(2) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_rotation(2) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_position(2, 500) assert not graphic.get_changed_flag(), "Changed flag should not be set!" graphic.reset_changed_flag() graphic.set_weedline(True) assert graphic.get_changed_flag(), "Changed flag should be set!"
def test_changed_flag(self): """Check that changed flag works correctly.""" graphic = Graphic(etree.parse("arrow.svg").getroot()) graphic.reset_changed_flag() graphic.set_mirror_x(True) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_mirror_x(False) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_scale(2) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_rotation(2) assert graphic.get_changed_flag(), "Changed flag should be set!" graphic.reset_changed_flag() graphic.set_position(2, 500) assert not graphic.get_changed_flag( ), "Changed flag should not be set!" graphic.reset_changed_flag() graphic.set_weedline(True) assert graphic.get_changed_flag(), "Changed flag should be set!"