jpellerin / nose3

python3.0 compatible version of nose.

Clone this repository (size: 2.2 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/jpellerin/nose3/

Changed (Δ384 bytes):

raw changeset »

nose/plugins/__init__.py (20 lines added, 4 lines removed)

Up to file-list nose/plugins/__init__.py:

@@ -24,16 +24,18 @@ Registering
24
24
25
25
For nose to find a plugin, it must be part of a package that uses
26
26
setuptools_, and the plugin must be included in the entry points defined
27
in the setup.py for the package::
27
in the setup.py for the package:
28
28
29
  setup(name='Some plugin',
30
        ...
29
.. code-block:: python
30
31
    setup(name='Some plugin',
32
        # ...
31
33
        entry_points = {
32
34
            'nose.plugins.0.10': [
33
35
                'someplugin = someplugin:SomePlugin'
34
36
                ]
35
37
            },
36
        ...
38
        # ...
37
39
        )
38
40
39
41
Once the package is installed with install or develop, nose will be able
@@ -41,6 +43,20 @@ to load the plugin.
41
43
42
44
.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools
43
45
46
Registering a plugin without setuptools
47
=======================================
48
49
It is currently possible to register a plugin programmatically by 
50
creating a custom nose runner like this :
51
52
.. code-block:: python
53
    
54
    import nose
55
    from yourplugin import YourPlugin
56
    
57
    if __name__ == '__main__':
58
        nose.main(addplugins=[YourPlugin()])
59
44
60
Defining options
45
61
================
46
62