bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

Only functions that don't accept an argument should be included #468

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Define a method that looks like a test method e.g., "def 
select_test(testname)"
2. Run nosetests

What is the expected output? What do you see instead?
Nose should not try to run it because the execution will fail for not passing 
any arguments.

What version of the product are you using? On what operating system?
1.1.2

Please provide any additional information below.
I basically need to have a class named "Test", so methods such as select_test() 
that query the db by a test name get picked up as unit tests. Since test 
methods shouldn't be accepting any arguments, why not exclude these?

Original issue reported on code.google.com by harid...@gmail.com on 12 Nov 2011 at 4:55

GoogleCodeExporter commented 8 years ago
You can work around this for now by marking the methods that look like tests 
but aren't with .__test __ = False. See 
http://readthedocs.org/docs/nose/en/latest/finding_tests.html?highlight=__test__

Original comment by jpelle...@gmail.com on 14 Nov 2011 at 2:26

GoogleCodeExporter commented 8 years ago
Yes, I am already doing that and it is acceptable for me since I have only
two methods.

accept an argument should be included

tests but aren't with .__test __ = False. See
http://readthedocs.org/docs/nose/en/latest/finding_tests.html?highlight=__test__

Original comment by harid...@gmail.com on 14 Nov 2011 at 3:47