예제 #1
0
    def test_valid_file(self):
        """Should not raise an exception when a valid file is to be converted"""

        try:
            grapple.sam_to_bam(self._test_file)

        except Exception as e:
            self.fail(e)
예제 #2
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_valid_file(self):
        """Should not raise an exception when a valid file is to be converted"""

        try:
            grapple.sam_to_bam(self._test_file)

        except Exception as e:
            self.fail(e)
예제 #3
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.sam_to_bam(self._test_file, prefix_id=None)
예제 #4
0
파일: test.py 프로젝트: qsirianni/grapple
    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.sam_to_bam(self._test_file, prefix_id=0)
예제 #5
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_none_file(self):
        """Should raise an exception when None is passed as the read file"""

        with self.assertRaises(AttributeError):
            grapple.sam_to_bam(None)
예제 #6
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_absent_file(self):
        """Should raise an exception when the read file does not exist"""

        with self.assertRaises(CalledProcessError):
            grapple.sam_to_bam('this_file_does_not_exist.sam')
예제 #7
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_invalid_file(self):
        """Should raise an exception when a file with the wrong format is converted"""

        with self.assertRaises(ValueError):
            grapple.sam_to_bam(os.path.join('test_files', 'lambda_ref.fa'))
예제 #8
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.sam_to_bam(self._test_file, prefix_id=None)
예제 #9
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.sam_to_bam(self._test_file, prefix_id=0)
예제 #10
0
    def test_none_file(self):
        """Should raise an exception when None is passed as the read file"""

        with self.assertRaises(AttributeError):
            grapple.sam_to_bam(None)
예제 #11
0
    def test_absent_file(self):
        """Should raise an exception when the read file does not exist"""

        with self.assertRaises(CalledProcessError):
            grapple.sam_to_bam('this_file_does_not_exist.sam')
예제 #12
0
    def test_invalid_file(self):
        """Should raise an exception when a file with the wrong format is converted"""

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