def test_config_fail(self): config = ffg.Configuration() self.assertRaises( ffg.ConfigException, lambda: config.load(""" conkeror: cmdlin3e: xulrunner-bin .*conkeror actions: rmem > 1073741824: term """))
def test_config_sigstop_success(self): config = ffg.Configuration() config.load("""# for conkeror conkeror: cmdline: xulrunner-bin .*conkeror actions: rmem > 1073741824: stop @ 2m """) self.assertEquals(['stop', '@', 120], config.monitor[0].actions[0][1].action_list)
def test_config_final_success(self): config = ffg.Configuration() config.load("""# for conkeror conkeror: cmdline: xulrunner-bin .*conkeror final: True actions: rmem > 1073741824: term """) self.assertEquals(True, config.monitor[0].final)
def test_config_success(self): config = ffg.Configuration() config.load("""# for conkeror conkeror: cmdline: xulrunner-bin .*conkeror actions: rmem > 1073741824: term """) self.assertEquals('conkeror', config.monitor[0].name) self.assertEquals(False, config.monitor[0].check_children)