mirror of
https://github.com/lutris/lutris
synced 2024-10-04 14:59:37 +00:00
Stupid git, can't merge simple stuff itself
This commit is contained in:
commit
599ab23595
|
@ -27,7 +27,6 @@ from gi.repository import Gio
|
||||||
|
|
||||||
from lutris import pga
|
from lutris import pga
|
||||||
from lutris.util.log import logger
|
from lutris.util.log import logger
|
||||||
from lutris.util.strings import slugify
|
|
||||||
from lutris.settings import PGA_DB, CONFIG_DIR, DATA_DIR, CACHE_DIR, ICON_PATH
|
from lutris.settings import PGA_DB, CONFIG_DIR, DATA_DIR, CACHE_DIR, ICON_PATH
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
import os
|
import os
|
||||||
from gi.repository import Gio
|
from gi.repository import Gio
|
||||||
from lutris.game import Game
|
from lutris.game import Game
|
||||||
|
from lutris.config import check_config
|
||||||
|
from lutris import settings
|
||||||
|
from lutris import pga
|
||||||
from lutris.gui import config_dialogs
|
from lutris.gui import config_dialogs
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from lutris import runners
|
from lutris import runners
|
||||||
|
|
||||||
|
TEST_PGA_PATH = os.path.join(os.path.dirname(__file__), 'pga.db')
|
||||||
|
|
||||||
|
|
||||||
class TestGameDialogCommon(TestCase):
|
class TestGameDialogCommon(TestCase):
|
||||||
def test_get_runner_liststore(self):
|
def test_get_runner_liststore(self):
|
||||||
|
@ -16,6 +21,9 @@ class TestGameDialogCommon(TestCase):
|
||||||
|
|
||||||
|
|
||||||
class TestGameDialog(TestCase):
|
class TestGameDialog(TestCase):
|
||||||
|
def setUp(self):
|
||||||
|
check_config()
|
||||||
|
|
||||||
def test_dialog(self):
|
def test_dialog(self):
|
||||||
dlg = config_dialogs.AddGameDialog(None)
|
dlg = config_dialogs.AddGameDialog(None)
|
||||||
self.assertEqual(dlg.notebook.get_current_page(), 0)
|
self.assertEqual(dlg.notebook.get_current_page(), 0)
|
||||||
|
@ -40,9 +48,6 @@ class TestGameDialog(TestCase):
|
||||||
exe_field = game_box.get_children()[0].get_children()[1]
|
exe_field = game_box.get_children()[0].get_children()[1]
|
||||||
self.assertEqual(exe_field.__class__.__name__, 'FileChooserButton')
|
self.assertEqual(exe_field.__class__.__name__, 'FileChooserButton')
|
||||||
|
|
||||||
runner_dropdown.set_active(2)
|
|
||||||
self.assertEqual(dlg.lutris_config.runner, runners.__all__[1])
|
|
||||||
|
|
||||||
def test_can_add_game(self):
|
def test_can_add_game(self):
|
||||||
dlg = config_dialogs.AddGameDialog(None)
|
dlg = config_dialogs.AddGameDialog(None)
|
||||||
name_entry = dlg.vbox.get_children()[0].get_children()[1]
|
name_entry = dlg.vbox.get_children()[0].get_children()[1]
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/python
|
|
||||||
import unittest
|
import unittest
|
||||||
import os
|
import os
|
||||||
from sqlite3 import IntegrityError, OperationalError
|
from sqlite3 import IntegrityError, OperationalError
|
||||||
|
|
Loading…
Reference in a new issue