[Biopython-dev] Test files leftovers

Manlio Calvi manlio.calvi at gmail.com
Fri Apr 25 02:27:31 EDT 2014


If the problem is delete the files at the end of the tests maybe the
last test in BWA test suite search for all those files with one or
more regex and call os.remove() method to delete it, you don't need
the files after all tests on them runs out.
Another cleaner way, although need more work, is create a folder test
inside the BWA test suite and put there the files created, run there
the tests and then remove the folder at the end, this mean rewrite the
path to that test folder.

Manlio

On Fri, Apr 25, 2014 at 6:43 AM, Saket Choudhary <saketkc at gmail.com> wrote:
> Apparently I have polluted the master branch of my biopython clone:
> https://github.com/saketkc/biopython
>
> PR on a fake clone: https://github.com/saketkc/biopython-2/pull/1/files
>
> On 25 April 2014 06:57, Saket Choudhary <saketkc at gmail.com> wrote:
>> Maybe, I need some help here:
>>
>> A simple tearDown() approach won't work as I need the indexed files to
>> be present for 'test_samse' and 'test_sampe' to be run.
>>
>> What I need is a tearDownClass() approach but it is not supported on python2.6.
>>
>> Any suggestions?
>>
>> Saket
>>
>> On 25 April 2014 05:41, Saket Choudhary <saketkc at gmail.com> wrote:
>>> Hi Bow,
>>>
>>> These are generated by the test functions written for BWA wrapper
>>> which I wrote. I could send a PR which does a  'cleanup' in
>>> tearDown()?
>>>
>>> Saket
>>>
>>> On 25 April 2014 05:35, Wibowo Arindrarto <w.arindrarto at gmail.com> wrote:
>>>> Hello everyone,
>>>>
>>>> I was running full tests when I noticed that some of our test cases
>>>> seem to create files for testing but not delete them afterwards.
>>>>
>>>> I have these from my tests:
>>>>
>>>> BWA/1.sai
>>>> BWA/1.sam
>>>> BWA/2.sai
>>>> BWA/human_g1k_v37_truncated.fasta.amb
>>>> BWA/human_g1k_v37_truncated.fasta.ann
>>>> BWA/human_g1k_v37_truncated.fasta.bwt
>>>> BWA/human_g1k_v37_truncated.fasta.pac
>>>> BWA/human_g1k_v37_truncated.fasta.sa
>>>> BWA/out.sam
>>>> SamBam/bam1.bam.bai
>>>> TreeConstruction/bootstrap_consensus.tre
>>>> TreeConstruction/pars1.tre
>>>> TreeConstruction/pars2.tre
>>>> bam1.bam
>>>>
>>>> Now, I could just add these files to .gitignore, but I think it's more
>>>> proper if we at least try to remove them after every test. In some
>>>> cases, I saw that the creation of these files is actually the test.
>>>> Which means having them before the test (i.e. from a previous run) may
>>>> not be ideal.
>>>>
>>>> But I could be wrong, so I'm sending this first to ask whether these
>>>> files should have been deleted or not :).
>>>>
>>>> Cheers,
>>>> Bow
>>>> _______________________________________________
>>>> Biopython-dev mailing list
>>>> Biopython-dev at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/biopython-dev
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython-dev


More information about the Biopython-dev mailing list