Ejemplo n.º 1
0
    def test_valid_file(self):
        """Should not raise an exception when a valid bam file is used"""

        try:
            grapple.bam_to_fq(self._test_file)

        except Exception as e:
            self.fail(e)
Ejemplo n.º 2
0
    def test_valid_file(self):
        """Should not raise an exception when a valid bam file is used"""

        try:
            grapple.bam_to_fq(self._test_file)

        except Exception as e:
            self.fail(e)
Ejemplo n.º 3
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.bam_to_fq(self._test_file, prefix_id=None)
Ejemplo n.º 4
0
    def test_bad_prefix(self):
        """Should raise an exception when a type that cannot be converted to a string is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.bam_to_fq(self._test_file, prefix_id=0)
Ejemplo n.º 5
0
    def test_none_file(self):
        """Should raise an exception when None is given"""

        with self.assertRaises(AttributeError):
            grapple.bam_to_fq(None)
Ejemplo n.º 6
0
    def test_no_file(self):
        """Should raise an exception when no file is given"""

        with self.assertRaises(ValueError):
            grapple.bam_to_fq('')
Ejemplo n.º 7
0
    def test_absent_file(self):
        """Should raise an exception when the file does not exist"""

        with self.assertRaises(CalledProcessError):
            grapple.bam_to_fq('this_file_does_not_exist.bam')
Ejemplo n.º 8
0
    def test_invalid_file(self):
        """Should raise an exception when the wrong type of file is used"""

        with self.assertRaises(ValueError):
            grapple.bam_to_fq(os.path.join('test_files', 'lambda_ref.fa'))
Ejemplo n.º 9
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.bam_to_fq(self._test_file, prefix_id=None)
Ejemplo n.º 10
0
    def test_bad_prefix(self):
        """Should raise an exception when a type that cannot be converted to a string is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.bam_to_fq(self._test_file, prefix_id=0)
Ejemplo n.º 11
0
    def test_none_file(self):
        """Should raise an exception when None is given"""

        with self.assertRaises(AttributeError):
            grapple.bam_to_fq(None)
Ejemplo n.º 12
0
    def test_no_file(self):
        """Should raise an exception when no file is given"""

        with self.assertRaises(ValueError):
            grapple.bam_to_fq('')
Ejemplo n.º 13
0
    def test_absent_file(self):
        """Should raise an exception when the file does not exist"""

        with self.assertRaises(CalledProcessError):
            grapple.bam_to_fq('this_file_does_not_exist.bam')
Ejemplo n.º 14
0
    def test_invalid_file(self):
        """Should raise an exception when the wrong type of file is used"""

        with self.assertRaises(ValueError):
            grapple.bam_to_fq(os.path.join('test_files', 'lambda_ref.fa'))