import os

from sequana import FastA, sequana_data


def test_format_contigs_denovo():
    # test with a custom fasta
    filename = sequana_data("test_fasta.fasta") 
    contigs = FastA(filename)
    contigs.format_contigs_denovo(project="test")

    # cleanup
    try:
        os.remove("test.ab500.fasta")
        os.remove("test.bl500.fasta")
    except:
        pass

@@ -44,16 +44,45 @@
 na_data%0A
+from easydev import TempFile%0A
 %0A%0Adef te
@@ -227,175 +227,89 @@
     
-contigs.format_contigs_denovo(project=%22test%22)%0A%0A    # cleanup%0A    try:%0A        os.remove(%22test.ab500.fasta%22)%0A        os.remove(%22test.bl500.fasta%22)%0A    except:%0A        pass
+with TempFile(suffix='.fasta') as fh:%0A        contigs.format_contigs_denovo(fh.name)
 %0A

fix test bug