diff --git a/lutris/runners/uae.py b/lutris/runners/uae.py index 32134d830..fbc671d6c 100644 --- a/lutris/runners/uae.py +++ b/lutris/runners/uae.py @@ -60,8 +60,8 @@ class uae(Runner): ] self.game_options = [{ "option": "disk", - "type":"multiple", - "label":"Floppies" + "type": "multiple", + "label": "Floppies" }] self.runner_options = [ @@ -72,28 +72,28 @@ class uae(Runner): }, { "option": "x11.floppy_path", - "label":"Floppy path", + "label": "Floppy path", "type": "directory_chooser" }, { "option": "use_gui", "label": "Show UAE gui", - "type":"bool" + "type": "bool" }, { "option": "gfx_fullscreen_amiga", "label": "Fullscreen (F12 + s to Switch)", - "type":"bool" + "type": "bool" }, { "option": "gfx_show_leds_fullscreen", "label": "Show LEDs", - "type":"bool" + "type": "bool" }, { "option": "machine", - "label":"Type of Amiga", - "type":"one_choice", + "label": "Type of Amiga", + "type": "one_choice", "choices": [(choice.values()[0], choice.keys()[0]) for choice in amiga_choices] }, @@ -105,7 +105,7 @@ class uae(Runner): }, { "option": "joyport1", - "label":"Player 2 Control", + "label": "Player 2 Control", "type": "one_choice", "choices": control_choices }, diff --git a/tests/test_pga.py b/tests/test_pga.py index c78fdda4c..96ae7a08a 100644 --- a/tests/test_pga.py +++ b/tests/test_pga.py @@ -1,23 +1,21 @@ #!/usr/bin/python import unittest import os - -from lutris.settings import PGA_DB +from lutris import settings from lutris import pga +TEST_PGA_PATH = os.path.join(os.path.dirname(__file__), 'fixtures/pga.db') + class TestPersonnalGameArchive(unittest.TestCase): - def test_database(self): - pga_path = os.path.join(os.path.expanduser('~'), - ".local/share/lutris/pga.db") - self.assertEqual(PGA_DB, pga_path) - self.assertTrue(os.path.exists(PGA_DB)) + def setUp(self): + settings.PGA_DB = TEST_PGA_PATH def test_add_game(self): pga.add_game(name="LutrisTest", machine="Linux", runner="Linux") game_list = pga.get_games() - print(game_list) - #self.assertTrue("LutrisTest" in game_list) + game_names = [item[1] for item in game_list] + self.assertTrue("LutrisTest" in game_names) def test_delete_game(self): pga.delete_game("LutrisTest") diff --git a/tests/test_uae.py b/tests/test_uae.py index 6fdac11aa..e3783e007 100644 --- a/tests/test_uae.py +++ b/tests/test_uae.py @@ -23,9 +23,9 @@ class TestUae(TestCase): } } uae_runner = uae.uae(config) - uae_runner.insert_floppies() - self.assertIn('floppy0', uae_runner.uae_options) - self.assertNotIn('floppy1', uae_runner.uae_options) + disks = uae_runner.insert_floppies() + self.assertIn('floppy0', disks) + self.assertNotIn('floppy1', disks) # Two disks, two floppy drives config = { @@ -37,9 +37,9 @@ class TestUae(TestCase): } } uae_runner = uae.uae(config) - uae_runner.insert_floppies() - self.assertIn('floppy0', uae_runner.uae_options) - self.assertIn('floppy1', uae_runner.uae_options) + disks = uae_runner.insert_floppies() + self.assertIn('floppy0', disks) + self.assertIn('floppy1', disks) # Zero disk, two floppy drives config = {