def test_FindSingleEmulatorOnMac(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('OSX', 'SNES', False)
     ems_found = len(emulators)
     self.assertTrue(
         ems_found == 1,
         u'Found {0} SNES emulators, expecting 1'.format(ems_found))
 def test_FindMultipleEmulatorOnMac(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('OSX', 'Atari 2600', False)
     ems_found = len(emulators)
     self.assertTrue(
         ems_found == 2,
         u'Found {0} Atari 2600 emulators, expecting 2'.format(ems_found))
 def test_UnableToFindIncorrectOS(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('UnknownOS', 'SNES', False)
     self.assertTrue(
         len(emulators) == 0,
         u'Found {0} "UnknownOS" emulators, expecting 0'.format(
             len(emulators)))
Exemplo n.º 4
0
    def test_NoOSElementsFound(self):
        autoconfigxmlfile = os.path.join(os.path.dirname(__file__), 'testdata', 'test_emu_autoconfig_empty.xml')
        autoconfig = EmulatorAutoconfig(autoconfigxmlfile)
        autoconfig.readXml()
        oses = autoconfig.operatingSystems

        self.assertTrue(len(oses) == 0, u'Found {0} operating systems, expecting 0'.format(len(oses)))
 def test_OperatingSystems(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     autoconfig.readXml()
     oses = autoconfig.operatingSystems
     self.assertTrue(
         len(oses) == 4,
         u'Found {0} operating systems, expecting 4'.format(len(oses)))
 def test_UnableToFindNonDefinedEmulatorOnMac(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('OSX', 'UnknownPlatform', False)
     ems_found = len(emulators)
     self.assertTrue(
         ems_found == 0,
         u'Found {0} "UnknownPlatform" emulators, expecting 0'.format(
             ems_found))
    def test_NoOSElementsFound(self):
        autoconfigxmlfile = os.path.join(os.path.dirname(__file__), 'testdata',
                                         'test_emu_autoconfig_empty.xml')
        autoconfig = EmulatorAutoconfig(autoconfigxmlfile)
        autoconfig.readXml()
        oses = autoconfig.operatingSystems

        self.assertTrue(
            len(oses) == 0,
            u'Found {0} operating systems, expecting 0'.format(len(oses)))
Exemplo n.º 8
0
    def test_EmulatorCommandAndParams(self):
        autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
        emulators = autoconfig.findEmulators('OSX', 'SNES', False)
        print(emulators[0].emuCmd)

        self.assertEqual(emulators[0].emuCmd, u'/Applications/RetroArch.app/Contents/MacOS/RetroArch',
                         u'Emulator command doesn\'t equal expected value')
        self.assertEqual(emulators[0].emuParams,
                         u'-v -L /Applications/RetroArch.app/Contents/Resources/cores/snes9x_libretro.dylib "%rom%"',
                         u'Emulator params doesn\'t equal expected value')
    def test_EmulatorCommandAndParams(self):
        autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
        emulators = autoconfig.findEmulators('OSX', 'SNES', False)
        print(emulators[0].emuCmd)

        self.assertEqual(
            emulators[0].emuCmd,
            u'/Applications/RetroArch.app/Contents/MacOS/RetroArch',
            u'Emulator command doesn\'t equal expected value')
        self.assertEqual(
            emulators[0].emuParams,
            u'-v -L /Applications/RetroArch.app/Contents/Resources/cores/snes9x_libretro.dylib "%rom%"',
            u'Emulator params doesn\'t equal expected value')
Exemplo n.º 10
0
 def test_OperatingSystems(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     autoconfig.readXml()
     oses = autoconfig.operatingSystems
     self.assertTrue(len(oses) == 4, u'Found {0} operating systems, expecting 4'.format(len(oses)))
Exemplo n.º 11
0
 def test_UnableToFindNonDefinedEmulatorOnMac(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('OSX', 'UnknownPlatform', False)
     ems_found = len(emulators)
     self.assertTrue(ems_found == 0, u'Found {0} "UnknownPlatform" emulators, expecting 0'.format(ems_found))
Exemplo n.º 12
0
 def test_FindMultipleEmulatorOnMac(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('OSX', 'Atari 2600', False)
     ems_found = len(emulators)
     self.assertTrue(ems_found == 2, u'Found {0} Atari 2600 emulators, expecting 2'.format(ems_found))
Exemplo n.º 13
0
 def test_FindSingleEmulatorOnMac(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('OSX', 'SNES', False)
     ems_found = len(emulators)
     self.assertTrue(ems_found == 1, u'Found {0} SNES emulators, expecting 1'.format(ems_found))
Exemplo n.º 14
0
 def test_UnableToFindIncorrectOS(self):
     autoconfig = EmulatorAutoconfig(self.autoconfigxmlfile)
     emulators = autoconfig.findEmulators('UnknownOS', 'SNES', False)
     self.assertTrue(len(emulators) == 0, u'Found {0} "UnknownOS" emulators, expecting 0'.format(len(emulators)))