The file template for python unit tests explains setUp as "Called before the first testfunction is executed" and tearDown as "Called after the last testfunction was executed". However, this is not correct as setUp and tearDown are invoked before/ after each test method is executed [1]. [1] http://docs.python.org/3.3/library/unittest.html#basic-example and http://docs.python.org/3.3/library/unittest.html#unittest.TestCase.setUp Reproducible: Always Steps to Reproduce: 1. Use File -> New from template -> Python -> Basic -> PyUnit Actual Results: New test w/ incorrect comments is created Expected Results: New w/ correct or no comments is created
Created attachment 80431 [details] tiny patch for the incorrect comments This is trivial to fix as it is enough to correct the comments. I have commit rights to kde:kate. Would it be ok for you guys if I'd push such tiny changes to kdevelop or do you prefer bugs/ review requests?
Git commit d86365bdf1ee6cfa11e12c45ff88b8f05ac74062 by Friedrich W. H. Kossebau, on behalf of Gerald Senarclens de Grancy. Committed on 11/01/2017 at 02:21. Pushed by kossebau into branch '5.0'. Fix comments in file template for Python unit test for setUp/tearDown FIXED-IN:5.0.4 M +2 -2 file_templates/testing/python_pyunit/class.py https://commits.kde.org/kdevelop/d86365bdf1ee6cfa11e12c45ff88b8f05ac74062