1
0
mirror of https://github.com/gryf/fs-uae-wrapper.git synced 2025-12-28 17:32:31 +01:00

Added copy_conf method test

This commit is contained in:
2016-12-31 18:47:55 +01:00
parent 1878fd48a1
commit fe83ae1813
2 changed files with 14 additions and 3 deletions

View File

@@ -141,10 +141,11 @@ class CD32(object):
curdir = os.path.abspath('.') curdir = os.path.abspath('.')
os.chdir(self.dir) os.chdir(self.dir)
utils.extract_archive(self.arch_filepath, result = utils.extract_archive(self.arch_filepath,
self.all_options.get('wrapper_gui_msg'), item) self.all_options.get('wrapper_gui_msg'),
item)
os.chdir(curdir) os.chdir(curdir)
return True return result
def _run_game(self, fs_uae_options): def _run_game(self, fs_uae_options):
"""execute game in provided directory""" """execute game in provided directory"""

View File

@@ -80,3 +80,13 @@ class TestCD32(TestCase):
acd32.set_assets_paths() acd32.set_assets_paths()
full_path = os.path.join(self.dirname, 'Config_save.7z') full_path = os.path.join(self.dirname, 'Config_save.7z')
self.assertEqual(acd32.save_filename, full_path) 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')))