Exemple #1
0
    def test_benchmark_run(self):
        experiment = Experiment(Experiment.BENCHMARK, self.detector, "-findings_path-")

        run = experiment.get_run(self.version)

        assert_is_instance(run, Run)
        assert_equals(1, len(run.executions))
        assert_is_instance(run.executions[0], MineAndDetectExecution)
Exemple #2
0
    def test_provided_patterns_run(self):
        experiment = Experiment(Experiment.PROVIDED_PATTERNS, self.detector, "-findings_path-")

        run = experiment.get_run(self.version)

        assert_is_instance(run, Run)
        assert_equals(1, len(run.executions))
        assert_is_instance(run.executions[0], DetectOnlyExecution)
Exemple #3
0
    def test_top_findings_run(self):
        experiment = Experiment(Experiment.TOP_FINDINGS, self.detector, "-findings_path-", 42)

        run = experiment.get_run(self.version)

        assert_is_instance(run, Run)
        assert_equals(1, len(run.executions))
        assert_is_instance(run.executions[0], MineAndDetectExecution)
        assert_is_instance(run.executions[0].findings_filter, AllFindings)
        assert_equals(42, run.executions[0].findings_filter.limit)