Back to index

python-biopython  1.60
Classes | Functions | Variables
test_SeqIO_write Namespace Reference

Classes

class  WriterTests

Functions

def funct
def funct_e

Variables

 BytesIO = StringIO
tuple test_write_read_alignment_formats = sorted(SeqIO._FormatToWriter.keys())
list test_records
tuple runner = unittest.TextTestRunner(verbosity = 2)

Function Documentation

def test_SeqIO_write.funct (   records,
  format,
  descr 
)

Definition at line 147 of file test_SeqIO_write.py.

00147 
00148         def funct(records, format, descr):
00149             f = lambda x : x.check(records, format)
00150             f.__doc__ = "%s for %s" % (format, descr)
            return f
def test_SeqIO_write.funct_e (   records,
  format,
  descr,
  err_type,
  err_msg 
)

Definition at line 157 of file test_SeqIO_write.py.

00157 
00158                 def funct_e(records, format, descr, err_type, err_msg):
00159                     f = lambda x : x.check_write_fails(records, format,
00160                                                        err_type, err_msg)
00161                     f.__doc__ = "%s for %s" % (format, descr)
                    return f

Variable Documentation

Definition at line 21 of file test_SeqIO_write.py.

tuple test_SeqIO_write.runner = unittest.TextTestRunner(verbosity = 2)

Definition at line 169 of file test_SeqIO_write.py.

Initial value:
00001 [
00002     ([], "zero records", {}),
00003     ([SeqRecord(Seq("CHSMAIKLSSEHNIPSGIANAL",Alphabet.generic_protein), id="Alpha"),
00004       SeqRecord(Seq("HNGFTALEGEIHHLTHGEKVAF",Alphabet.generic_protein), id="Gamma"),
00005       SeqRecord(Seq("DITHGVG",Alphabet.generic_protein), id="delta")],
00006      "three peptides of different lengths", []),
00007     ([SeqRecord(Seq("CHSMAIKLSSEHNIPSGIANAL",Alphabet.generic_protein), id="Alpha"),
00008       SeqRecord(Seq("VHGMAHPLGAFYNTPHGVANAI",Alphabet.generic_protein), id="Beta"),
00009       SeqRecord(Seq("HNGFTALEGEIHHLTHGEKVAF",Alphabet.generic_protein), id="Gamma")],
00010      "three proteins alignment", []),
00011     ([SeqRecord(Seq("AATAAACCTTGCTGGCCATTGTGATCCATCCA",Alphabet.generic_dna), id="X"),
00012       SeqRecord(Seq("ACTCAACCTTGCTGGTCATTGTGACCCCAGCA",Alphabet.generic_dna), id="Y"),
00013       SeqRecord(Seq("TTTCCTCGGAGGCCAATCTGGATCAAGACCAT",Alphabet.generic_dna), id="Z")],
00014      "three DNA sequence alignment", []),
00015     ([SeqRecord(Seq("AATAAACCTTGCTGGCCATTGTGATCCATCCA",Alphabet.generic_dna), id="X",
00016                 name="The\nMystery\rSequece:\r\nX"),
00017       SeqRecord(Seq("ACTCAACCTTGCTGGTCATTGTGACCCCAGCA",Alphabet.generic_dna), id="Y",
00018                 description="an%sevil\rdescription right\nhere" % os.linesep),
00019       SeqRecord(Seq("TTTCCTCGGAGGCCAATCTGGATCAAGACCAT",Alphabet.generic_dna), id="Z")],
00020      "3 DNA seq alignment with CR/LF in name/descr",
00021       [(["genbank"], ValueError, r"Locus identifier 'The\nMystery\rSequece:\r\nX' is too long")]),
00022     ([SeqRecord(Seq("CHSMAIKLSSEHNIPSGIANAL",Alphabet.generic_protein), id="Alpha"),
00023       SeqRecord(Seq("VHGMAHPLGAFYNTPHGVANAI",Alphabet.generic_protein), id="Beta"),
00024       SeqRecord(Seq("VHGMAHPLGAFYNTPHGVANAI",Alphabet.generic_protein), id="Beta"),
00025       SeqRecord(Seq("HNGFTALEGEIHHLTHGEKVAF",Alphabet.generic_protein), id="Gamma")],
00026      "alignment with repeated record",
00027      [(["stockholm"],ValueError,"Duplicate record identifier: Beta"),
00028       (["phylip","phylip-relaxed","phylip-sequential"],ValueError,"Repeated name 'Beta' (originally 'Beta'), possibly due to truncation")]),
00029     ]

Definition at line 38 of file test_SeqIO_write.py.

tuple test_SeqIO_write.test_write_read_alignment_formats = sorted(SeqIO._FormatToWriter.keys())

Definition at line 26 of file test_SeqIO_write.py.