ipython / ipython/ipykernel

test_serialize.py fails in ipykernel-5.4.2

Abierto
#574 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
734
Forks
412
Merge medio
1 d 5 h
PR fusionados (30 d)
8

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.