Пример #1
0
    def test_valid_file(self):
        """Should not raise an exception when supplying valid files"""

        try:
            grapple.format_consensus(self._test_file)

        except Exception as e:
            self.fail(e)
Пример #2
0
    def test_valid_file(self):
        """Should not raise an exception when supplying valid files"""

        try:
            grapple.format_consensus(self._test_file)

        except Exception as e:
            self.fail(e)
Пример #3
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.format_consensus(self._test_file, prefix_id=None)
Пример #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.format_consensus(self._test_file, prefix_id=0)
Пример #5
0
    def test_none_file(self):
        """Should raise an exception when None is passed as a file"""

        with self.assertRaises(AttributeError):
            grapple.format_consensus(None)
Пример #6
0
    def test_absent_file(self):
        """Should raise an exception when the file does not exist"""

        with self.assertRaises(IOError):
            grapple.format_consensus('this_file_does_not_exist.fa')
Пример #7
0
    def test_invalid_file(self):
        """Should raise an exception when the file is not in FASTA format"""

        with self.assertRaises(ValueError):
            grapple.format_consensus(os.path.join('test_files', 'lambda_reads.fq'))
Пример #8
0
    def test_none_prefix(self):
        """Should raise an exception when None is used as the prefix"""

        with self.assertRaises(TypeError):
            grapple.format_consensus(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.format_consensus(self._test_file, prefix_id=0)
Пример #10
0
    def test_none_file(self):
        """Should raise an exception when None is passed as a file"""

        with self.assertRaises(AttributeError):
            grapple.format_consensus(None)
Пример #11
0
    def test_absent_file(self):
        """Should raise an exception when the file does not exist"""

        with self.assertRaises(IOError):
            grapple.format_consensus('this_file_does_not_exist.fa')
Пример #12
0
    def test_invalid_file(self):
        """Should raise an exception when the file is not in FASTA format"""

        with self.assertRaises(ValueError):
            grapple.format_consensus(
                os.path.join('test_files', 'lambda_reads.fq'))