Bug 321005 - File template for Python unit test has incorrect comments
Summary: File template for Python unit test has incorrect comments
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Application templates (show other bugs)
Version: git master
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-10 17:24 UTC by Gerald Senarclens de Grancy
Modified: 2017-01-11 02:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.0.4
Sentry Crash Report:


Attachments
tiny patch for the incorrect comments (604 bytes, patch)
2013-06-10 17:29 UTC, Gerald Senarclens de Grancy
Details

Note You need to log in before you can comment on or make changes to this bug.
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