Show More
@@ -108,9 +108,9 b' def make_label_dec(label, ds=None):' | |||
|
108 | 108 | >>> slow = make_label_dec('slow') |
|
109 | 109 | >>> slow.__doc__ |
|
110 | 110 | "Labels a test as 'slow'." |
|
111 | ||
|
111 | ||
|
112 | 112 | And one that uses multiple labels and a custom docstring: |
|
113 | ||
|
113 | ||
|
114 | 114 | >>> rare = make_label_dec(['slow','hard'], |
|
115 | 115 | ... "Mix labels 'slow' and 'hard' for rare tests.") |
|
116 | 116 | >>> rare.__doc__ |
@@ -280,7 +280,7 b' def module_not_available(module):' | |||
|
280 | 280 | |
|
281 | 281 | def decorated_dummy(dec, name): |
|
282 | 282 | """Return a dummy function decorated with dec, with the given name. |
|
283 | ||
|
283 | ||
|
284 | 284 | Examples |
|
285 | 285 | -------- |
|
286 | 286 | import IPython.testing.decorators as dec |
@@ -318,6 +318,11 b' _x11_skip_msg = "Skipped under *nix when X11/XOrg not available"' | |||
|
318 | 318 | |
|
319 | 319 | skip_if_no_x11 = skipif(_x11_skip_cond, _x11_skip_msg) |
|
320 | 320 | |
|
321 | ||
|
322 | # Decorators to skip certain tests on specific platform/python combinations | |
|
323 | skip_win32_py38 = skipif(sys.version_info > (3,8) and os.name == 'nt') | |
|
324 | ||
|
325 | ||
|
321 | 326 | # not a decorator itself, returns a dummy function to be used as setup |
|
322 | 327 | def skip_file_no_x11(name): |
|
323 | 328 | warnings.warn("The function `skip_file_no_x11` is deprecated since IPython 4.0", |
@@ -21,11 +21,13 b' import IPython' | |||
|
21 | 21 | from IPython import paths |
|
22 | 22 | from IPython.testing import decorators as dec |
|
23 | 23 | from IPython.testing.decorators import (skip_if_not_win32, skip_win32, |
|
24 |
onlyif_unicode_paths, |
|
|
24 | onlyif_unicode_paths, skipif, | |
|
25 | skip_win32_py38,) | |
|
25 | 26 | from IPython.testing.tools import make_tempfile, AssertPrints |
|
26 | 27 | from IPython.utils import path |
|
27 | 28 | from IPython.utils.tempdir import TemporaryDirectory |
|
28 | 29 | |
|
30 | ||
|
29 | 31 | # Platform-dependent imports |
|
30 | 32 | try: |
|
31 | 33 | import winreg as wreg |
@@ -128,7 +130,7 b' def test_get_home_dir_2():' | |||
|
128 | 130 | nt.assert_equal(home_dir, unfrozen) |
|
129 | 131 | |
|
130 | 132 | |
|
131 | @skipif(sys.version_info > (3,8) and os.name == 'nt') | |
|
133 | @skip_win32_py38 | |
|
132 | 134 | @with_environment |
|
133 | 135 | def test_get_home_dir_3(): |
|
134 | 136 | """get_home_dir() uses $HOME if set""" |
@@ -146,6 +148,7 b' def test_get_home_dir_4():' | |||
|
146 | 148 | # this should still succeed, but we don't care what the answer is |
|
147 | 149 | home = path.get_home_dir(False) |
|
148 | 150 | |
|
151 | @skip_win32_py38 | |
|
149 | 152 | @with_environment |
|
150 | 153 | def test_get_home_dir_5(): |
|
151 | 154 | """raise HomeDirError if $HOME is specified, but not a writable dir""" |
General Comments 0
You need to be logged in to leave comments.
Login now