Beispiel #1
0
    def test_compare_exceptions(self):
        temp_dir = gettempdir()
        self.to_delete.append(temp_dir)

        with self.assertRaises(BadParameter):
            compare(self.interest_fp, self.other_fp, temp_dir,
                    interest_pcts=(50, 55), other_pcts=(100,))

        with self.assertRaises(BadParameter):
            compare(self.interest_fp, self.other_fp, temp_dir,
                    interest_alg_lens=(20,), other_alg_lens=(100, 10))
Beispiel #2
0
    def test_compare_base(self):
        temp_dir = gettempdir()
        self.to_delete.append(temp_dir)

        compare(self.interest_fp, self.other_fp, temp_dir)

        files = ['compile_output.txt', 'compile_output_no_nohits.txt',
                 'summary_p1_70-a1_50_p2_70-a2_50.txt']
        for fp in files:
            exp_fp = join(self.base, 'compare-tests', fp)
            out_fp = join(temp_dir, fp)

            with open(exp_fp) as exp, open(out_fp) as out:
                self.assertItemsEqual(exp.readlines(), out.readlines())
Beispiel #3
0
    def test_compare_base(self):
        temp_dir = gettempdir()
        self.to_delete.append(temp_dir)

        compare(self.interest_fp, self.other_fp, temp_dir)

        files = [
            'compile_output.txt', 'compile_output_no_nohits.txt',
            'summary_p1_70-a1_50_p2_70-a2_50.txt'
        ]
        for fp in files:
            exp_fp = join(self.base, 'compare-tests', fp)
            out_fp = join(temp_dir, fp)

            with open(exp_fp) as exp, open(out_fp) as out:
                self.assertItemsEqual(exp.readlines(), out.readlines())
Beispiel #4
0
    def test_compare_exceptions(self):
        temp_dir = gettempdir()
        self.to_delete.append(temp_dir)

        with self.assertRaises(BadParameter):
            compare(self.interest_fp,
                    self.other_fp,
                    temp_dir,
                    interest_pcts=(50, 55),
                    other_pcts=(100, ))

        with self.assertRaises(BadParameter):
            compare(self.interest_fp,
                    self.other_fp,
                    temp_dir,
                    interest_alg_lens=(20, ),
                    other_alg_lens=(100, 10))