コード例 #1
0
ファイル: test_genbank.py プロジェクト: mortonjt/scikit-bio
 def test_parse_locus_invalid(self):
     lines = [
         # missing unit
         ["LOCUS       NC_005816               9609 " "    DNA     circular CON 07-FEB-2015"],
         # missing division
         ["LOCUS       SCU49845     5028 bp" "    DNA                    21-JUN-1999"],
         # wrong date format
         ["LOCUS       NP_001832                360 aa" "            linear   PRI 2001-12-18"],
     ]
     for line in lines:
         with six.assertRaisesRegex(self, GenBankFormatError, "Could not parse the LOCUS line:.*"):
             _parse_locus(line)
コード例 #2
0
ファイル: test_genbank.py プロジェクト: ElDeveloper/biolopy
 def test_parse_locus_invalid(self):
     lines = [
         # missing unit
         ['LOCUS       NC_005816               9609 '
          '    DNA     circular CON 07-FEB-2015'],
         # missing division
         ['LOCUS       SCU49845     5028 bp'
          '    DNA                    21-JUN-1999'],
         # wrong date format
         ['LOCUS       NP_001832                360 aa'
          '            linear   PRI 2001-12-18']]
     for line in lines:
         with self.assertRaisesRegex(GenBankFormatError,
                                     r'Could not parse the LOCUS line:.*'):
             _parse_locus(line)
コード例 #3
0
 def test_parse_locus_invalid(self):
     lines = [
         # missing unit
         ['LOCUS       NC_005816               9609 '
          '    DNA     circular CON 07-FEB-2015'],
         # missing division
         ['LOCUS       SCU49845     5028 bp'
          '    DNA                    21-JUN-1999'],
         # wrong date format
         ['LOCUS       NP_001832                360 aa'
          '            linear   PRI 2001-12-18']]
     for line in lines:
         with self.assertRaisesRegex(GenBankFormatError,
                                     'Could not parse the LOCUS line:.*'):
             _parse_locus(line)
コード例 #4
0
ファイル: test_genbank.py プロジェクト: ElDeveloper/biolopy
 def test_parse_locus(self):
     for serialized, parsed in self.locus:
         self.assertEqual(_parse_locus(serialized), parsed)
コード例 #5
0
 def test_parse_locus(self):
     for serialized, parsed in self.locus:
         self.assertEqual(_parse_locus(serialized), parsed)