Beispiel #1
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.call_variants(self._test_file,
                                  self._ref_file,
                                  prefix_id=None)
Beispiel #2
0
    def test_valid_files(self):
        """Should not raise an exception when supplying valid files"""

        try:
            grapple.call_variants(self._test_file, self._ref_file)

        except Exception as e:
            self.fail(e)
Beispiel #3
0
    def test_valid_files(self):
        """Should not raise an exception when supplying valid files"""

        try:
            grapple.call_variants(self._test_file, self._ref_file)

        except Exception as e:
            self.fail(e)
Beispiel #4
0
    def test_bad_prefix(self):
        """Should raise an exception when a type that cannot be converted to a string is given for the prefix"""

        with self.assertRaises(TypeError):
            grapple.call_variants(self._test_file, self._ref_file, prefix_id=0)
Beispiel #5
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.call_variants(self._test_file, self._ref_file, prefix_id=None)
Beispiel #6
0
    def test_absent_ref_file(self):
        """Should raise an exception when the reference file doesn't exist"""

        with self.assertRaises(CalledProcessError):
            grapple.call_variants(self._test_file, 'this_file_does_not_exist.fa')
Beispiel #7
0
    def test_none_ref_file(self):
        """Should raise an exception when None is passed as the reference file"""

        with self.assertRaises(AttributeError):
            grapple.call_variants(self._test_file, None)
Beispiel #8
0
    def test_none_read_file(self):
        """Should raise an exception when None is used as the read file"""

        with self.assertRaises(AttributeError):
            grapple.call_variants(None, self._ref_file)
Beispiel #9
0
    def test_invalid_ref_file(self):
        """Should raise an exception when the reference file is not in the right format"""

        with self.assertRaises(ValueError):
            grapple.call_variants(self._test_file, os.path.join('test_files', 'lambda_reads.fq'))
Beispiel #10
0
    def test_invalid_read_file(self):
        """Should raise an exception when supplying a read file with the wrong format"""

        with self.assertRaises(ValueError):
            grapple.call_variants(self._ref_file, self._ref_file)
Beispiel #11
0
    def test_absent_read_file(self):
        """Should raise an exception when supplying a read file that doesn't exist"""

        with self.assertRaises(CalledProcessError):
            grapple.call_variants('this_file_does_not_exist.bam', self._ref_file)
Beispiel #12
0
    def test_absent_read_file(self):
        """Should raise an exception when supplying a read file that doesn't exist"""

        with self.assertRaises(CalledProcessError):
            grapple.call_variants('this_file_does_not_exist.bam',
                                  self._ref_file)
Beispiel #13
0
    def test_invalid_read_file(self):
        """Should raise an exception when supplying a read file with the wrong format"""

        with self.assertRaises(ValueError):
            grapple.call_variants(self._ref_file, self._ref_file)
Beispiel #14
0
    def test_bad_prefix(self):
        """Should raise an exception when a type that cannot be converted to a string is given for the prefix"""

        with self.assertRaises(TypeError):
            grapple.call_variants(self._test_file, self._ref_file, prefix_id=0)
Beispiel #15
0
    def test_none_ref_file(self):
        """Should raise an exception when None is passed as the reference file"""

        with self.assertRaises(AttributeError):
            grapple.call_variants(self._test_file, None)
Beispiel #16
0
    def test_absent_ref_file(self):
        """Should raise an exception when the reference file doesn't exist"""

        with self.assertRaises(CalledProcessError):
            grapple.call_variants(self._test_file,
                                  'this_file_does_not_exist.fa')
Beispiel #17
0
    def test_invalid_ref_file(self):
        """Should raise an exception when the reference file is not in the right format"""

        with self.assertRaises(ValueError):
            grapple.call_variants(
                self._test_file, os.path.join('test_files', 'lambda_reads.fq'))
Beispiel #18
0
    def test_none_read_file(self):
        """Should raise an exception when None is used as the read file"""

        with self.assertRaises(AttributeError):
            grapple.call_variants(None, self._ref_file)