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