##// END OF EJS Templates
Actually warn that some function will be removed....
Matthias Bussonnier -
Show More
@@ -35,6 +35,7 b' import sys'
35 import os
35 import os
36 import tempfile
36 import tempfile
37 import unittest
37 import unittest
38 import warnings
38
39
39 from decorator import decorator
40 from decorator import decorator
40
41
@@ -75,6 +76,8 b' def apply_wrapper(wrapper,func):'
75 This will ensure that wrapped functions can still be well introspected via
76 This will ensure that wrapped functions can still be well introspected via
76 IPython, for example.
77 IPython, for example.
77 """
78 """
79 warnings.warn("The function `apply_wrapper` is deprecated and might be removed in next major version of IPython", DeprecationWarning)
80
78 import nose.tools
81 import nose.tools
79
82
80 return decorator(wrapper,nose.tools.make_decorator(func)(wrapper))
83 return decorator(wrapper,nose.tools.make_decorator(func)(wrapper))
@@ -125,6 +128,7 b' def make_label_dec(label,ds=None):'
125 True
128 True
126 """
129 """
127
130
131 warnings.warn("THe function `make_label_dec` is deprecated and might be removed in next major version of IPython", DeprecationWarning)
128 if isinstance(label, string_types):
132 if isinstance(label, string_types):
129 labels = [label]
133 labels = [label]
130 else:
134 else:
@@ -280,6 +284,7 b' def decorated_dummy(dec, name):'
280 import IPython.testing.decorators as dec
284 import IPython.testing.decorators as dec
281 setup = dec.decorated_dummy(dec.skip_if_no_x11, __name__)
285 setup = dec.decorated_dummy(dec.skip_if_no_x11, __name__)
282 """
286 """
287 warnings.warn("THe function `make_label_dec` is deprecated and might be removed in next major version of IPython", DeprecationWarning)
283 dummy = lambda: None
288 dummy = lambda: None
284 dummy.__name__ = name
289 dummy.__name__ = name
285 return dec(dummy)
290 return dec(dummy)
@@ -312,6 +317,7 b' skip_if_no_x11 = skipif(_x11_skip_cond, _x11_skip_msg)'
312
317
313 # not a decorator itself, returns a dummy function to be used as setup
318 # not a decorator itself, returns a dummy function to be used as setup
314 def skip_file_no_x11(name):
319 def skip_file_no_x11(name):
320 warnings.warn("The function `skip_file_no_x11` is deprecated and might be removed in next major version of IPython", DeprecationWarning)
315 return decorated_dummy(skip_if_no_x11, name) if _x11_skip_cond else None
321 return decorated_dummy(skip_if_no_x11, name) if _x11_skip_cond else None
316
322
317 # Other skip decorators
323 # Other skip decorators
@@ -352,6 +358,7 b' def onlyif_cmds_exist(*commands):'
352 """
358 """
353 Decorator to skip test when at least one of `commands` is not found.
359 Decorator to skip test when at least one of `commands` is not found.
354 """
360 """
361 warnings.warn("The function `onlyif_cmds_exist` is deprecated and might be removed in next major version of IPython", DeprecationWarning)
355 for cmd in commands:
362 for cmd in commands:
356 if not which(cmd):
363 if not which(cmd):
357 return skip("This test runs only if command '{0}' "
364 return skip("This test runs only if command '{0}' "
@@ -362,6 +369,7 b' def onlyif_any_cmd_exists(*commands):'
362 """
369 """
363 Decorator to skip test unless at least one of `commands` is found.
370 Decorator to skip test unless at least one of `commands` is found.
364 """
371 """
372 warnings.warn("The function `onlyif_any_cmd_exists` is deprecated and might be removed in next major version of IPython", DeprecationWarning)
365 for cmd in commands:
373 for cmd in commands:
366 if which(cmd):
374 if which(cmd):
367 return null_deco
375 return null_deco
General Comments 0
You need to be logged in to leave comments. Login now