ipython / ipython/ipykernel

test_serialize.py fails in ipykernel-5.4.2

オープン
#574 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
734
フォーク
412
平均マージ
1日 5時間
マージ済み PR(30日)
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。