~ubuntu-branches/debian/sid/python-biopython/sid

« back to all changes in this revision

Viewing changes to Tests/test_AlignIO_FastaIO.py

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2014-06-08 10:25:35 UTC
  • mfrom: (1.1.22)
  • Revision ID: package-import@ubuntu.com-20140608102535-ebgnhcpcrum3i3w8
Tags: 1.64+dfsg-1
* New upstream version
* Build-Depends raxml only on those architectures where it is available
  Closes: #750845

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    assert os.path.isfile(t_filename), t_filename
41
41
 
42
42
    #Try as an iterator using handle
43
 
    alignments = list(AlignIO.parse(handle=open(t_filename, "r"), format=t_format))
 
43
    with open(t_filename, "r") as handle:
 
44
        alignments = list(AlignIO.parse(handle, format=t_format))
44
45
    assert len(alignments) == t_count, \
45
46
         "Found %i alignments but expected %i" % (len(alignments), t_count)
46
47
    for alignment in alignments: