ipython / ipython/ipykernel

test_serialize.py fails in ipykernel-5.4.2

Aperta
#574 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
734
Fork
412
Merge medio
1g 5h
PR unite (30g)
8

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.