Bug 321005

Summary: File template for Python unit test has incorrect comments
Product: [Applications] kdevelop Reporter: Gerald Senarclens de Grancy <oss>
Component: Application templatesAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.0.4
Sentry Crash Report:
Attachments: tiny patch for the incorrect comments

Description Gerald Senarclens de Grancy 2013-06-10 17:24:41 UTC
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
Comment 1 Gerald Senarclens de Grancy 2013-06-10 17:29:04 UTC
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?
Comment 2 Friedrich W. H. Kossebau 2017-01-11 02:22:13 UTC
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