test_serialize.py fails in ipykernel-5.4.2
- 主要語言
- Python
- 星號
- 734
- 分支
- 412
- 平均合併
- 1 天 5 小時
- 30 天內合併 PR
- 8
描述
Hi, while attempting to update ipykernel Gentoo package to latest version I encountered some test failures in `test_serialize.py` suite. Failures are reproducible with py 3.7, 3.8 & 3.9.
Here is the test log:
```python
===================================================================================================== FAILURES ======================================================================================================
_________________________________________________________________________________________________ test_numpy_in_seq _________________________________________________________________________________________________
args = (), kwargs = {}
def skipper_func(*args, **kwargs):
"""Skipper for normal test functions."""
if skip_val():
raise nose.SkipTest(get_msg(f,msg))
else:
> return f(*args, **kwargs)
/usr/lib/python3.7/site-packages/IPython/testing/decorators.py:212:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@dec.skip_without('numpy')
def test_numpy_in_seq():
import numpy
from numpy.testing.utils import assert_array_equal
for shape in SHAPES:
for dtype in DTYPES:
A = new_array(shape, dtype=dtype)
bufs = serialize_object((A,1,2,b'hello'))
canned = pickle.loads(bufs[0])
> assert isinstance(canned[0], CannedArray)
E assert False
E + where False = isinstance(, CannedArray)
ipykernel/tests/test_serialize.py:111: AssertionError
________________________________________________________________________________________________ test_numpy_in_dict _________________________________________________________________________________________________
args = (), kwargs = {}
def skipper_func(*args, **kwargs):
"""Skipper for normal test functions."""
if skip_val():
raise nose.SkipTest(get_msg(f,msg))
else:
> return f(*args, **kwargs)
/usr/lib/python3.7/site-packages/IPython/testing/decorators.py:212:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
@dec.skip_without('numpy')
def test_numpy_in_dict():
import numpy
from numpy.testing.utils import assert_array_equal
for shape in SHAPES:
for dtype in DTYPES:
A = new_array(shape, dtype=dtype)
bufs = serialize_object(dict(a=A,b=1,c=range(20)))
canned = pickle.loads(bufs[0])
> assert isinstance(canned['a'], CannedArray)
E assert False
E + where False = isinstance(, CannedArray)
ipykernel/tests/test_serialize.py:128: AssertionError
____________________________________________________________________________________________________ test_class _____________________________________________________________________________________________________
def test_class():
@interactive
class C(object):
a=5
bufs = serialize_object(dict(C=C))
canned = pickle.loads(bufs[0])
> assert isinstance(canned['C'], CannedClass)
E assert False
E + where False = isinstance(, CannedClass)
ipykernel/tests/test_serialize.py:142: AssertionError
________________________________________________________________________________________________ test_class_oldstyle ________________________________________________________________________________________________
def test_class_oldstyle():
@interactive
class C:
a=5
bufs = serialize_object(dict(C=C))
canned = pickle.loads(bufs[0])
> assert isinstance(canned['C'], CannedClass)
E assert False
E + where False = isinstance(, CannedClass)
ipykernel/tests/test_serialize.py:154: AssertionError
______________________________________________________________________________________________ test_class_inheritance _______________________________________________________________________________________________
def test_class_inheritance():
@interactive
class C(object):
a=5
@interactive
class D(C):
b=10
bufs = serialize_object(dict(D=D))
canned = pickle.loads(bufs[0])
> assert isinstance(canned['D'], CannedClass)
E assert False
E + where False = isinstance(, CannedClass)
ipykernel/tests/test_serialize.py:197: AssertionError
================================================================================================= warnings summary ==================================================================================================
```
貢獻指南
評估
這個 Issue 還沒有評估資料。