Commits

Jason Pellerin committed 6af7804

Fixed for 2.3

Comments (0)

Files changed (2)

functional_tests/test_withid_failures.rst

     >>> import os
+    >>> import sys
     >>> from nose.plugins.plugintest import run_buffered as run
     >>> from nose.plugins.testid import TestId
     >>> import tempfile
 Addressing failures works (sometimes).
 
     >>> argv.append('1')
+    >>> _junk = sys.modules.pop('test_a', None) # 2.3 requires
     >>> run(argv=argv, plugins=[TestId()])
     #1 Failure: ImportError (No module named apackagethatdoesntexist) ... ERROR
     <BLANKLINE>

nose/plugins/attrib.py

 Here's how to set ``slow=1`` like above with the decorator:
 
     >>> from nose.plugins.attrib import attr
-    >>> @attr('slow')
+    >>> # @attr('slow')
     ... def test_big_download():
     ...     import urllib
     ...     # commence slowness...
-    ... 
+    >>> test_big_download = attr('slow')(test_big_download)
 
 And here's how to set an attribute with a specific value :
 
     >>> from nose.plugins.attrib import attr
-    >>> @attr(speed='slow')
+    >>> # @attr(speed='slow')
     ... def test_big_download():
     ...     import urllib
     ...     # commence slowness...
-    ... 
+    >>> test_big_download = attr(speed='slow')(test_big_download)
 
 
 Simple syntax