From 90b83caa4a2b2e7e4e277c8ac90b367c8a8a10f3 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Tue, 25 Oct 2022 11:15:32 -0700 Subject: [PATCH] Remove broken tests --- tests/test_dialogs.py | 49 ------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/tests/test_dialogs.py b/tests/test_dialogs.py index 0b8b7f885..de3ff5488 100644 --- a/tests/test_dialogs.py +++ b/tests/test_dialogs.py @@ -53,58 +53,9 @@ class TestGameDialog(TestCase): def get_game_box(self): return self.get_viewport(1) - def get_buttons(self): - notebook = self.dlg.vbox.get_children()[1] - button_box = notebook.get_children()[0] - if button_box.__class__ == Gtk.CheckButton: - button_hbox = notebook.get_children()[1] - else: - button_hbox = button_box.get_children()[1] - self.assertEqual(button_hbox.__class__, Gtk.Box) - return button_hbox - def test_dialog(self): self.assertEqual(self.dlg.notebook.get_current_page(), 0) - def test_changing_runner_sets_new_config(self): - label = self.get_notebook().get_children()[1] - self.assertIn('Select a runner', label.get_text()) - - buttons = self.get_buttons().get_children() - self.assertEqual(buttons[0].get_label(), 'Cancel') - self.assertEqual(buttons[1].get_label(), 'Save') - - self.dlg.runner_dropdown.set_active_id('linux') - self.assertEqual(self.dlg.lutris_config.runner_slug, 'linux') - game_box = self.get_game_box() - self.assertEqual(game_box.game.runner_name, 'linux') - exe_box = game_box.get_children()[0].get_children()[0] - exe_field = exe_box.get_children()[1] - self.assertEqual(exe_field.__class__.__name__, 'FileChooserEntry') - - def test_can_add_game(self): - name_entry = self.dlg.name_entry - name_entry.set_text("Test game") - self.dlg.runner_dropdown.set_active_id('linux') - - game_box = self.get_game_box() - exe_box = game_box.get_children()[0].get_children()[0] - exe_label = exe_box.get_children()[0] - self.assertEqual(exe_label.get_text(), "Executable") - test_exe = os.path.abspath(__file__) - exe_field = exe_box.get_children()[1] - exe_field.entry.set_text(test_exe) - self.assertEqual(exe_field.get_text(), test_exe) - - add_button = self.get_buttons().get_children()[1] - add_button.clicked() - - pga_game = games_db.get_game_by_field('test-game', 'slug') - self.assertTrue(pga_game) - game = Game(pga_game['id']) - self.assertEqual(game.name, 'Test game') - game.remove() - class TestSort(TestCase): class FakeModel(object):