Exemple #1
0
    def test_close(self):
        """
        Tests close
        :return: Tests results
        """
        logger = Logger()
        logger.setup()
        logger.close()

        self.assertEqual(False, logger.is_loaded)
    def test_close(self):
        """
        Tests close
        :return: Tests results
        """
        logger = Logger()
        logger.setup()
        logger.close()

        self.assertEqual(False, logger.is_loaded)
Exemple #3
0
    def test_debug_level(self):
        """
        Test debug level
        :return: Test results
        """
        logger = Logger()
        logger.setup(10, 10, 10, "logger.log", "", "", 5, None)
        level = logger.max_detail_log_level()
        logger.close()

        self.assertEqual(True, level == 5)
    def test_debug_level(self):
        """
        Test debug level
        :return: Test results
        """
        logger = Logger()
        logger.setup(10, 10, 10, "logger.log", "", "", 5, None)
        level = logger.max_detail_log_level()
        logger.close()

        self.assertEqual(True, level == 5)
Exemple #5
0
    def test_setup(self):
        """
        Tests setup
        :return: Tests results
        """
        l = Logger()

        l.setup(10)

        self.assertEqual(True, l.is_loaded)

        l.close()
    def test_setup(self):
        """
        Tests setup
        :return: Tests results
        """
        l = Logger()

        l.setup(10)

        self.assertEqual(True, l.is_loaded)

        l.close()
Exemple #7
0
        handler.applyPatch( 'happyVending' )

    if( config[ 'patches' ][ 'FixMusicTransition' ] ):
        handler.applyPatch( 'fixMusicTransition' )
        

print( 'Writing to ' + outFile + '...' )
sys.stdout.flush()

try:
    handler.write( outFile )
except Exception as ex:
    logger.logError( 'System error: {0}'.format(ex) )
    print( 'An irrecoverable error occured' )

if( not logger.error ):
    print( 'Modifications completed successfully.  See log file for details (Warning: spoilers!).' )
    print( 'Seed was ' + str( handler.randomseed ) )
    print( 'Enter this seed in settings file to produce the same ROM again.' )
else:
    print( 'Program ended with errors.  See log file for details.' )
sys.stdout.flush()

logger.logAlways( logger.getHeader( 'Seed' ) )

logger.logAlways( 'Seed was ' + str( handler.randomseed ) + '.' )

logger.close()

logger.rename( 'randomize-' + str( handler.randomseed ) + '.log')