예제 #1
0
    def test_config_fail(self):
        config = ffg.Configuration()

        self.assertRaises(
            ffg.ConfigException, lambda: config.load("""
conkeror:
  cmdlin3e: xulrunner-bin .*conkeror
  actions:
    rmem > 1073741824: term
"""))
예제 #2
0
    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)
예제 #3
0
    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)
예제 #4
0
    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)