def test_save_load_global_window_position(): x1 = Dice.roll()[0] y1 = Dice.roll()[0] prefs.save_global_window_position(window_name, x1, y1) x2, y2 = prefs.load_global_window_position(window_name) assert x2 == x1 assert y2 == y1
def save_window_position(self): x, y = self.get_position() prefs.save_global_window_position(self.__class__.__name__, x, y) width, height = self.get_size() prefs.save_global_window_size(self.__class__.__name__, width, height)