New submission from Carl Friedrich Bolz-Tereick <cfb...@gmx.de>:

test_field_descriptor in test_collections tries to pickle the descriptors of a 
namedtuple's fields, which is _collections._itemgetter on CPython. However, on 
PyPy that class doesn't exist. The code in collections deals fine with that 
fact, but the above-mentioned test does not make sense in that situation, since 
you can't pickle properties.

To test this behaviour, you can replace
"from _collections import _tuplegetter"
in collections/__init__.py with raise ImportError and see the test fail on 
CPython too.

----------
messages: 406738
nosy: Carl.Friedrich.Bolz
priority: normal
severity: normal
status: open
title: test_collections has a wrong test in case _itemgetter is not available
versions: Python 3.11

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45859>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to