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

        try:
            grapple.read_correction(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 FASTQ file is used"""

        try:
            grapple.read_correction(self._test_file)

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

        with self.assertRaises(ValueError):
            grapple.read_correction(os.path.join('test_files', 'lambda_ref.fa'))
예제 #4
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_none_match_type(self):
        """Should raise an exception when None is given as a match type"""

        with self.assertRaises(TypeError):
            grapple.read_correction(self._test_file, match_type=None)
예제 #5
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_invalid_match_type(self):
        """Should raise an exception when an invalid match type is given"""

        with self.assertRaises(ValueError):
            grapple.read_correction(self._test_file, match_type='not_a_match_type')
예제 #6
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_none_cell_type(self):
        """Should raise an exception when None is passed for the cell type"""

        with self.assertRaises(TypeError):
            grapple.read_correction(self._test_file, cell_type=None)
예제 #7
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_none_file(self):
        """Should raise an exception when None is passed as for the file"""

        with self.assertRaises(AttributeError):
            grapple.read_correction(None)
예제 #8
0
파일: test.py 프로젝트: qsirianni/grapple
    def test_absent_file(self):
        """Should raise an exception when the file is not found"""

        with self.assertRaises(ValueError):
            grapple.read_correction('this_file_does_not_exit.fq')
예제 #9
0
    def test_absent_file(self):
        """Should raise an exception when the file is not found"""

        with self.assertRaises(ValueError):
            grapple.read_correction('this_file_does_not_exit.fq')
예제 #10
0
    def test_invalid_file(self):
        """Should raise an exception when a file with the wrong format is used"""

        with self.assertRaises(ValueError):
            grapple.read_correction(os.path.join('test_files',
                                                 'lambda_ref.fa'))
예제 #11
0
    def test_none_match_type(self):
        """Should raise an exception when None is given as a match type"""

        with self.assertRaises(TypeError):
            grapple.read_correction(self._test_file, match_type=None)
예제 #12
0
    def test_invalid_match_type(self):
        """Should raise an exception when an invalid match type is given"""

        with self.assertRaises(ValueError):
            grapple.read_correction(self._test_file,
                                    match_type='not_a_match_type')
예제 #13
0
    def test_none_cell_type(self):
        """Should raise an exception when None is passed for the cell type"""

        with self.assertRaises(TypeError):
            grapple.read_correction(self._test_file, cell_type=None)
예제 #14
0
    def test_none_file(self):
        """Should raise an exception when None is passed as for the file"""

        with self.assertRaises(AttributeError):
            grapple.read_correction(None)