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", |
@@ -175,7 +175,8 b' def get_home_dir(require_writable=False):' | |||
|
175 | 175 | Uses os.path.expanduser('~'), and checks for writability. |
|
176 | 176 | |
|
177 | 177 | See stdlib docs for how this is determined. |
|
178 | $HOME is first priority on *ALL* platforms. | |
|
178 | For Python <3.8, $HOME is first priority on *ALL* platforms. | |
|
179 | For Python >=3.8 on Windows, %HOME% is no longer considered. | |
|
179 | 180 | |
|
180 | 181 | Parameters |
|
181 | 182 | ---------- |
@@ -21,14 +21,16 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 |
import winreg as wreg |
|
|
33 | import winreg as wreg | |
|
32 | 34 | except ImportError: |
|
33 | 35 | #Fake _winreg module on non-windows platforms |
|
34 | 36 | import types |
@@ -128,6 +130,7 b' def test_get_home_dir_2():' | |||
|
128 | 130 | nt.assert_equal(home_dir, unfrozen) |
|
129 | 131 | |
|
130 | 132 | |
|
133 | @skip_win32_py38 | |
|
131 | 134 | @with_environment |
|
132 | 135 | def test_get_home_dir_3(): |
|
133 | 136 | """get_home_dir() uses $HOME if set""" |
@@ -145,6 +148,7 b' def test_get_home_dir_4():' | |||
|
145 | 148 | # this should still succeed, but we don't care what the answer is |
|
146 | 149 | home = path.get_home_dir(False) |
|
147 | 150 | |
|
151 | @skip_win32_py38 | |
|
148 | 152 | @with_environment |
|
149 | 153 | def test_get_home_dir_5(): |
|
150 | 154 | """raise HomeDirError if $HOME is specified, but not a writable dir""" |
@@ -247,7 +251,7 b' def test_filefind():' | |||
|
247 | 251 | def test_get_long_path_name_win32(): |
|
248 | 252 | with TemporaryDirectory() as tmpdir: |
|
249 | 253 | |
|
250 |
# Make a long path. Expands the path of tmpdir prematurely as it may already have a long |
|
|
254 | # Make a long path. Expands the path of tmpdir prematurely as it may already have a long | |
|
251 | 255 | # path component, so ensure we include the long form of it |
|
252 | 256 | long_path = os.path.join(path.get_long_path_name(tmpdir), 'this is my long path name') |
|
253 | 257 | os.makedirs(long_path) |
@@ -311,7 +315,7 b' def test_get_py_filename():' | |||
|
311 | 315 | def test_unicode_in_filename(): |
|
312 | 316 | """When a file doesn't exist, the exception raised should be safe to call |
|
313 | 317 | str() on - i.e. in Python 2 it must only have ASCII characters. |
|
314 | ||
|
318 | ||
|
315 | 319 | https://github.com/ipython/ipython/issues/875 |
|
316 | 320 | """ |
|
317 | 321 | try: |
@@ -12,6 +12,22 b' environment:' | |||
|
12 | 12 | PYTHON_VERSION: "3.6.x" |
|
13 | 13 | PYTHON_ARCH: "64" |
|
14 | 14 | |
|
15 | - PYTHON: "C:\\Python37" | |
|
16 | PYTHON_VERSION: "3.7.x" | |
|
17 | PYTHON_ARCH: "32" | |
|
18 | ||
|
19 | - PYTHON: "C:\\Python37-x64" | |
|
20 | PYTHON_VERSION: "3.7.x" | |
|
21 | PYTHON_ARCH: "64" | |
|
22 | ||
|
23 | - PYTHON: "C:\\Python38" | |
|
24 | PYTHON_VERSION: "3.8.x" | |
|
25 | PYTHON_ARCH: "32" | |
|
26 | ||
|
27 | - PYTHON: "C:\\Python38-x64" | |
|
28 | PYTHON_VERSION: "3.8.x" | |
|
29 | PYTHON_ARCH: "64" | |
|
30 | ||
|
15 | 31 | init: |
|
16 | 32 | - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" |
|
17 | 33 | |
@@ -24,4 +40,3 b' install:' | |||
|
24 | 40 | - "%CMD_IN_ENV% cd results" |
|
25 | 41 | test_script: |
|
26 | 42 | - "%CMD_IN_ENV% iptest --coverage xml" |
|
27 |
General Comments 0
You need to be logged in to leave comments.
Login now