Show More
@@ -108,9 +108,9 b' def make_label_dec(label, ds=None):' | |||||
108 | >>> slow = make_label_dec('slow') |
|
108 | >>> slow = make_label_dec('slow') | |
109 | >>> slow.__doc__ |
|
109 | >>> slow.__doc__ | |
110 | "Labels a test as 'slow'." |
|
110 | "Labels a test as 'slow'." | |
111 |
|
111 | |||
112 | And one that uses multiple labels and a custom docstring: |
|
112 | And one that uses multiple labels and a custom docstring: | |
113 |
|
113 | |||
114 | >>> rare = make_label_dec(['slow','hard'], |
|
114 | >>> rare = make_label_dec(['slow','hard'], | |
115 | ... "Mix labels 'slow' and 'hard' for rare tests.") |
|
115 | ... "Mix labels 'slow' and 'hard' for rare tests.") | |
116 | >>> rare.__doc__ |
|
116 | >>> rare.__doc__ | |
@@ -280,7 +280,7 b' def module_not_available(module):' | |||||
280 |
|
280 | |||
281 | def decorated_dummy(dec, name): |
|
281 | def decorated_dummy(dec, name): | |
282 | """Return a dummy function decorated with dec, with the given name. |
|
282 | """Return a dummy function decorated with dec, with the given name. | |
283 |
|
283 | |||
284 | Examples |
|
284 | Examples | |
285 | -------- |
|
285 | -------- | |
286 | import IPython.testing.decorators as dec |
|
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 | skip_if_no_x11 = skipif(_x11_skip_cond, _x11_skip_msg) |
|
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 | # not a decorator itself, returns a dummy function to be used as setup |
|
326 | # not a decorator itself, returns a dummy function to be used as setup | |
322 | def skip_file_no_x11(name): |
|
327 | def skip_file_no_x11(name): | |
323 | warnings.warn("The function `skip_file_no_x11` is deprecated since IPython 4.0", |
|
328 | warnings.warn("The function `skip_file_no_x11` is deprecated since IPython 4.0", |
@@ -21,11 +21,13 b' import IPython' | |||||
21 | from IPython import paths |
|
21 | from IPython import paths | |
22 | from IPython.testing import decorators as dec |
|
22 | from IPython.testing import decorators as dec | |
23 | from IPython.testing.decorators import (skip_if_not_win32, skip_win32, |
|
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 | from IPython.testing.tools import make_tempfile, AssertPrints |
|
26 | from IPython.testing.tools import make_tempfile, AssertPrints | |
26 | from IPython.utils import path |
|
27 | from IPython.utils import path | |
27 | from IPython.utils.tempdir import TemporaryDirectory |
|
28 | from IPython.utils.tempdir import TemporaryDirectory | |
28 |
|
29 | |||
|
30 | ||||
29 | # Platform-dependent imports |
|
31 | # Platform-dependent imports | |
30 | try: |
|
32 | try: | |
31 | import winreg as wreg |
|
33 | import winreg as wreg | |
@@ -128,7 +130,7 b' def test_get_home_dir_2():' | |||||
128 | nt.assert_equal(home_dir, unfrozen) |
|
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 | @with_environment |
|
134 | @with_environment | |
133 | def test_get_home_dir_3(): |
|
135 | def test_get_home_dir_3(): | |
134 | """get_home_dir() uses $HOME if set""" |
|
136 | """get_home_dir() uses $HOME if set""" | |
@@ -146,6 +148,7 b' def test_get_home_dir_4():' | |||||
146 | # this should still succeed, but we don't care what the answer is |
|
148 | # this should still succeed, but we don't care what the answer is | |
147 | home = path.get_home_dir(False) |
|
149 | home = path.get_home_dir(False) | |
148 |
|
150 | |||
|
151 | @skip_win32_py38 | |||
149 | @with_environment |
|
152 | @with_environment | |
150 | def test_get_home_dir_5(): |
|
153 | def test_get_home_dir_5(): | |
151 | """raise HomeDirError if $HOME is specified, but not a writable dir""" |
|
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