Skip to content

Commit

Permalink
Renamed output files generated by phyloxml_writer unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
latvianlinuxgirl authored and ngoto committed Sep 19, 2009
1 parent 97d6f9e commit e71e3d0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/unit/bio/db/test_phyloxml_writer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,21 +228,28 @@ def test_generate_xml_with_sequence
end

def test_phyloxml_examples_file
outputfn = "phyloxml_examples_generated_in_test.xml"
phyloxml = Bio::PhyloXML::Parser.new(TestPhyloXMLData.example_xml)
writer = Bio::PhyloXML::Writer.new(TestPhyloXMLData.file("phyloxml_examples_test.xml"))
writer = Bio::PhyloXML::Writer.new(TestPhyloXMLData.file(outputfn))
phyloxml.each do |tree|
writer.write(tree)
end
writer.write_other(phyloxml.other)

assert_nothing_thrown do
Bio::PhyloXML::Parser.new(TestPhyloXMLData.file("phyloxml_examples_test.xml"))
Bio::PhyloXML::Parser.new(TestPhyloXMLData.file(outputfn))
end
# The output file is not deleted since it might be used in the phyloxml
# parser test. But since the order of tests can't be assumed, I can't
# hard code it in.
end

def test_made_up_xml_file
phyloxml = Bio::PhyloXML::Parser.new(TestPhyloXMLData.file("made_up.xml"))
writer = Bio::PhyloXML::Writer.new(TestPhyloXMLData.file("made_up_test.xml"))
writer = Bio::PhyloXML::Writer.new(TestPhyloXMLData.file("made_up_generated_in_test.xml"))
# The output file is not deleted since it might be used in the phyloxml
# parser test. But since the order of tests can't be assumed, I can't
# hard code it in.
phyloxml.each do |tree|
writer.write(tree)
end
Expand Down

0 comments on commit e71e3d0

Please sign in to comment.