From 83c4c4a1c9ad2f166217795beb43da9915855024 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon Date: Tue, 14 Dec 2021 13:58:45 -0800 Subject: [PATCH] Remove deletion of SQLite database in tests --- lutris/settings.py | 2 +- tests/test_pga.py | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/lutris/settings.py b/lutris/settings.py index 55a22b221..829fe1dac 100644 --- a/lutris/settings.py +++ b/lutris/settings.py @@ -28,7 +28,7 @@ COVERART_PATH = os.path.join(DATA_DIR, "coverart") ICON_PATH = os.path.join(GLib.get_user_data_dir(), "icons", "hicolor", "128x128", "apps") sio = SettingsIO(CONFIG_FILE) -if "nose2" in sys.argv[0] or "pytest" in sys.argv[0]: +if "nosetests" in sys.argv[0] or "nose2" in sys.argv[0] or "pytest" in sys.argv[0]: PGA_DB = "/tmp/pga.db" else: PGA_DB = sio.read_setting("pga_path") or os.path.join(DATA_DIR, "pga.db") diff --git a/tests/test_pga.py b/tests/test_pga.py index b53e14153..248144195 100644 --- a/tests/test_pga.py +++ b/tests/test_pga.py @@ -16,11 +16,6 @@ class DatabaseTester(unittest.TestCase): os.remove(settings.PGA_DB) schema.syncdb() - def tearDown(self): - if os.path.exists(settings.PGA_DB): - os.remove(settings.PGA_DB) - - class TestPersonnalGameArchive(DatabaseTester): def test_add_game(self): games_db.add_game(name="LutrisTest", runner="Linux")