Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8361063

Browse files
committed
Do not deep-reload collection to fix tests.
Will allow test of #8464 to pass.
1 parent 5a106ac commit 8361063

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

IPython/lib/tests/test_deepreload.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import nose.tools as nt
1111

1212
from IPython.testing import decorators as dec
13-
from IPython.utils.py3compat import builtin_mod_name
13+
from IPython.utils.py3compat import builtin_mod_name, PY3
1414
from IPython.utils.syspathcontext import prepended_to_syspath
1515
from IPython.utils.tempdir import TemporaryDirectory
1616
from IPython.lib.deepreload import reload as dreload
@@ -29,6 +29,13 @@ def test_deepreload_numpy():
2929
# Test-related exclusions:
3030
'unittest', 'UserDict',
3131
]
32+
33+
# `collections` builtin shall not be reloaded to avoid failure
34+
# of lib.pretty collections related pretty printing.
35+
# of course this make nose crash on Py3 because of Py 2.3 compat...
36+
if not PY3:
37+
exclude.append('collections')
38+
3239
dreload(numpy, exclude=exclude)
3340

3441
def test_deepreload():

0 commit comments

Comments
 (0)