Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(22)  |  Call(22)  |  Derive(0)  |  Import(0)

src/b/i/biopython-HEAD/Bio/AlignIO/PhylipIO.py   biopython(Download)
    handle = StringIO(phylip_text2)
    list2 = list(PhylipIterator(handle))
    handle.close()
    assert len(list2) == 1
    assert len(list2[0]) == 5
 
    handle = StringIO(phylip_text3)
    list3 = list(PhylipIterator(handle))
    handle.close()
    handle = StringIO(phylip_text4)
    list4 = list(PhylipIterator(handle))
    handle.close()
    assert len(list4) == 1
    assert len(list4[0]) == 5
    except ValueError:
        print("Evil multiline non-interlaced example failed as expected")
    handle.close()
 
    handle = StringIO(phylip_text5a)
    list5 = list(PhylipIterator(handle))
    handle.close()

src/b/i/biopython-1.63/Bio/AlignIO/PhylipIO.py   biopython(Download)
    handle = StringIO(phylip_text2)
    list2 = list(PhylipIterator(handle))
    handle.close()
    assert len(list2) == 1
    assert len(list2[0]) == 5
 
    handle = StringIO(phylip_text3)
    list3 = list(PhylipIterator(handle))
    handle.close()
    handle = StringIO(phylip_text4)
    list4 = list(PhylipIterator(handle))
    handle.close()
    assert len(list4) == 1
    assert len(list4[0]) == 5
    except ValueError:
        print("Evil multiline non-interlaced example failed as expected")
    handle.close()
 
    handle = StringIO(phylip_text5a)
    list5 = list(PhylipIterator(handle))
    handle.close()

src/b/i/biopython-HEAD/Tests/test_SeqIO_write.py   biopython(Download)
                self.assertEqual(record.id, new_record.id)
            self.assertEqual(str(record.seq), str(new_record.seq))
        handle.close()
 
    def check_write_fails(self, records, format, err_type, err_msg=""):
        else:
            self.assertRaises(err_type, SeqIO.write, records, handle, format)
        handle.close()
 
for (records, descr, errs) in test_records:

src/b/i/biopython-HEAD/Tests/test_SeqIO_FastaIO.py   biopython(Download)
    def test_no_name(self):
        """Test FASTA record with no identifier."""
        handle = StringIO(">\nACGT")
        record = SeqIO.read(handle, "fasta")
        handle.close()

src/b/i/biopython-HEAD/Tests/test_Phylo_depend.py   biopython(Download)
        Phylo.draw_ascii(tree, file=handle)
        Phylo.draw_ascii(tree, file=handle, column_width=120)
        handle.close()
 
    if networkx:

src/b/i/biopython-HEAD/Tests/test_AlignIO.py   biopython(Download)
           "Writing no alignments to %s format should work!" \
           % t_format
    handle.close()
 
#Check writers reject non-alignments
    except (TypeError, AttributeError, ValueError):
        pass
    handle.close()
    del handle
del list_of_records, t_format
        handle.seek(0)
        assert 3 == len(list(AlignIO.parse(handle=handle, format=t_format, seq_count=t_per)))
        handle.close()
 
    #Some alignment file formats have magic characters which mean

src/b/i/biopython-HEAD/Tests/common_BioSQL.py   biopython(Download)
            self.assertTrue(compare_record(old, new))
        #Done
        handle.close()
        server.close()
 

src/b/i/biopython-1.63/Tests/test_SeqIO_write.py   biopython(Download)
                self.assertEqual(record.id, new_record.id)
            self.assertEqual(str(record.seq), str(new_record.seq))
        handle.close()
 
    def check_write_fails(self, records, format, err_type, err_msg=""):
        else:
            self.assertRaises(err_type, SeqIO.write, records, handle, format)
        handle.close()
 
for (records, descr, errs) in test_records:

src/b/i/biopython-1.63/Tests/test_SeqIO_FastaIO.py   biopython(Download)
    def test_no_name(self):
        """Test FASTA record with no identifier."""
        handle = StringIO(">\nACGT")
        record = SeqIO.read(handle, "fasta")
        handle.close()

src/b/i/biopython-1.63/Tests/test_Phylo_depend.py   biopython(Download)
        Phylo.draw_ascii(tree, file=handle)
        Phylo.draw_ascii(tree, file=handle, column_width=120)
        handle.close()
 
    if networkx: