Show More
@@ -35,6 +35,7 b' import sys' | |||
|
35 | 35 | import os |
|
36 | 36 | import tempfile |
|
37 | 37 | import unittest |
|
38 | import warnings | |
|
38 | 39 | |
|
39 | 40 | from decorator import decorator |
|
40 | 41 | |
@@ -75,6 +76,8 b' def apply_wrapper(wrapper,func):' | |||
|
75 | 76 | This will ensure that wrapped functions can still be well introspected via |
|
76 | 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 | 81 | import nose.tools |
|
79 | 82 | |
|
80 | 83 | return decorator(wrapper,nose.tools.make_decorator(func)(wrapper)) |
@@ -125,6 +128,7 b' def make_label_dec(label,ds=None):' | |||
|
125 | 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 | 132 | if isinstance(label, string_types): |
|
129 | 133 | labels = [label] |
|
130 | 134 | else: |
@@ -280,6 +284,7 b' def decorated_dummy(dec, name):' | |||
|
280 | 284 | import IPython.testing.decorators as dec |
|
281 | 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 | 288 | dummy = lambda: None |
|
284 | 289 | dummy.__name__ = name |
|
285 | 290 | return dec(dummy) |
@@ -312,6 +317,7 b' skip_if_no_x11 = skipif(_x11_skip_cond, _x11_skip_msg)' | |||
|
312 | 317 | |
|
313 | 318 | # not a decorator itself, returns a dummy function to be used as setup |
|
314 | 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 | 321 | return decorated_dummy(skip_if_no_x11, name) if _x11_skip_cond else None |
|
316 | 322 | |
|
317 | 323 | # Other skip decorators |
@@ -352,6 +358,7 b' def onlyif_cmds_exist(*commands):' | |||
|
352 | 358 | """ |
|
353 | 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 | 362 | for cmd in commands: |
|
356 | 363 | if not which(cmd): |
|
357 | 364 | return skip("This test runs only if command '{0}' " |
@@ -362,6 +369,7 b' def onlyif_any_cmd_exists(*commands):' | |||
|
362 | 369 | """ |
|
363 | 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 | 373 | for cmd in commands: |
|
366 | 374 | if which(cmd): |
|
367 | 375 | return null_deco |
General Comments 0
You need to be logged in to leave comments.
Login now