From fe83ae1813bb206503dd32a343b8bbdc9941fb74 Mon Sep 17 00:00:00 2001 From: gryf Date: Sat, 31 Dec 2016 18:47:55 +0100 Subject: [PATCH] Added copy_conf method test --- fs_uae_wrapper/cd32.py | 7 ++++--- tests/test_cd32.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/fs_uae_wrapper/cd32.py b/fs_uae_wrapper/cd32.py index 3949087..dcf6d89 100644 --- a/fs_uae_wrapper/cd32.py +++ b/fs_uae_wrapper/cd32.py @@ -141,10 +141,11 @@ class CD32(object): curdir = os.path.abspath('.') os.chdir(self.dir) - utils.extract_archive(self.arch_filepath, - self.all_options.get('wrapper_gui_msg'), item) + result = utils.extract_archive(self.arch_filepath, + self.all_options.get('wrapper_gui_msg'), + item) os.chdir(curdir) - return True + return result def _run_game(self, fs_uae_options): """execute game in provided directory""" diff --git a/tests/test_cd32.py b/tests/test_cd32.py index f8b119e..7776fc1 100644 --- a/tests/test_cd32.py +++ b/tests/test_cd32.py @@ -80,3 +80,13 @@ class TestCD32(TestCase): acd32.set_assets_paths() full_path = os.path.join(self.dirname, 'Config_save.7z') self.assertEqual(acd32.save_filename, full_path) + + def test_copy_conf(self): + + acd32 = cd32.CD32() + acd32.conf_file = self.fname + acd32.dir = self.dirname + + self.assertTrue(acd32._copy_conf()) + self.assertTrue(os.path.exists(os.path.join(self.dirname, + 'Config.fs-uae')))