nose-devs/nose — Issue #449: Can't test nose plug-in following examples in documentation
Author: jpellerin
Created: 2011-12-14 16:11:49+00:00
State: open

What steps will reproduce the problem?

1. Visit http://readthedocs.org/docs/nose/en/latest/plugins/testing.html
2. Use the code from the first example to create a new file (foo.py)
3. Run nosetests foo.py

What is the expected output? What do you see instead?

Nose should respond with 0 tests run (since there are no test_* methods on the test class). Instead, the test runner enters a loop (recursive?) and only stops on keyboard interrupt. Many traceback reporst are generated, the number proportional to the length of time nosetests is left running.

If I've mis-understood the purpose of the example code (you can use nose to test nose plugins, right?) some doc would be helpful. Help me understand the issue, and I'll be happy to create some documentation.

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

Nose 1.1.2 on Windows 7 x64

Please provide any additional information below.

Here's the full text of the file I'm using:
-------------
import unittest

from nose.plugins import Plugin, PluginTester

class FooPlugin(Plugin):
pass

class Test_PluginFoo(PluginTester, unittest.TestCase):
activate = '--with-foo'
plugins = [FooPlugin()]

def test_foo(self):
assert False

def makeSuite(self):
class TC(unittest.TestCase):
def runTest(self):
raise ValueError('Bailing out!')
return unittest.TestSuite([TC()])
-------------

Running nosetests.exe foo.py causes the loop.

Google Code Info:
Issue #: 455
Author: dogro...@gmail.com
Created On: 2011-10-04T22:04:46.000Z
Closed On: