Entering edit mode
3.8 years ago
Nobody
▴
30
Hello,
i would like to update a tool which is made by python 2 however this version has become obsolete. before making the 2to3 tool there is a set up of unit, functional tests ... that I could not understand them.
could someone help me with setting up these tests: steps ... do i need to make a separate file basically i have no idea.
This question is not really a bioinformatics question, and the people on this forum are probably not qualified to discuss the intricacies of test-driven development. However, I would say that for a bioinformatics tool you might be better off with regression testing rather than unit testing. Basically have a set out outputs that the python2 script covers for a wide range of inputs, and then check that the python 3 version produces the same output.
As Ian mentioned, this is not really the right forum for this, which is more of a software development query. It would be better suited to StackExchange (but fair warning, they will expect a more detailed question).
That said, even using python migration tools like
2to3
andsix
, there's a good chance a number of the tests will fail regardless because of changes to syntax, deprecation of some functions etc. Migration is rarely a smooth process.What you need to do with the tests will depend on which tool is being used for the testing. There are several different testing frameworks out there and you haven't told us anything about the tests themselves.
thank you, exactly it is a question of development but I am also a bioinformatician and I must obligatorily do the update if not I could not work with this tool
Its not even a case of whether it is suitable for this forum or not, people here are not likely to be able to answer your question.