ipython / ipython/ipykernel

test_serialize.py fails in ipykernel-5.4.2

Đang mở
#574 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
734
Fork
412
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
8

Mô tả

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 ==================================================================================================
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.