After debugging a bit, it seems that, for some reason, when running the test together, the second _DATA_TYPES is the same instance as the first one. Thus the returned DnaSeqMakefileWriter is the same instance of the first one, resulting in the DnaSeqMakefileWriter.lines variable already contains the first makefile content.
This may due to the face that the _DATA_TYPES is a variable in the file, rather than in a class/instance. I am not sure if this is a bug really but just a python variable scope thing I didn't understand well. Maybe we can chat about this when meet.
I was refactoring the teat code to work with the changes in dev branch when I notice a wired error:
I have a test file containing two tests: test_run_chipseq_se_makefile test_run_chipseq_pe_makefile
When running then individually, no error occurred.
However, when running them together, it seems that the Makefile generated by the second test contains the content of the first Makefile.
After debugging a bit, it seems that, for some reason, when running the test together, the second _DATA_TYPES is the same instance as the first one. Thus the returned DnaSeqMakefileWriter is the same instance of the first one, resulting in the DnaSeqMakefileWriter.lines variable already contains the first makefile content.
This may due to the face that the _DATA_TYPES is a variable in the file, rather than in a class/instance. I am not sure if this is a bug really but just a python variable scope thing I didn't understand well. Maybe we can chat about this when meet.
@lweasel