##// END OF EJS Templates
Small cleanups and documentation to testing support code....
Fernando Perez -
Show More
@@ -3,7 +3,12 b''
3 3 By default, nose's ismethod() fails for static methods.
4 4 Once this is fixed in upstream nose we can disable it.
5 5
6 Note: merely importing this module causes the monkeypatch to be applied."""
6 Notes:
7
8 - As of Nose 1.0.0, the problem persists so this monkeypatch is still
9 needed.
10
11 - Merely importing this module causes the monkeypatch to be applied."""
7 12
8 13 #-----------------------------------------------------------------------------
9 14 # Copyright (C) 2009-2011 The IPython Development Team
@@ -1,11 +1,27 b''
1 """This decorator marks that a doctest should be skipped.
1 """Decorators marks that a doctest should be skipped, for both python 2 and 3.
2 2
3 3 The IPython.testing.decorators module triggers various extra imports, including
4 4 numpy and sympy if they're present. Since this decorator is used in core parts
5 5 of IPython, it's in a separate module so that running IPython doesn't trigger
6 6 those imports."""
7
8 #-----------------------------------------------------------------------------
9 # Copyright (C) 2009-2011 The IPython Development Team
10 #
11 # Distributed under the terms of the BSD License. The full license is in
12 # the file COPYING, distributed as part of this software.
13 #-----------------------------------------------------------------------------
14
15 #-----------------------------------------------------------------------------
16 # Imports
17 #-----------------------------------------------------------------------------
18
7 19 import sys
8 20
21 #-----------------------------------------------------------------------------
22 # Decorators
23 #-----------------------------------------------------------------------------
24
9 25 def skip_doctest(f):
10 26 """Decorator - mark a function or method for skipping its doctest.
11 27
@@ -15,6 +31,7 b' def skip_doctest(f):'
15 31 f.skip_doctest = True
16 32 return f
17 33
34
18 35 def skip_doctest_py3(f):
19 36 """Decorator - skip the doctest under Python 3."""
20 37 f.skip_doctest = (sys.version_info[0] >= 3)
General Comments 0
You need to be logged in to leave comments. Login now