alexmojaki / alexmojaki/pure_eval

Test failures with PyPy3.10 7.3.13

Offen
#15 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Python
Sterne
50
Forks
19
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

When running the test suite against PyPy3.10, I'm getting the following failures:

```pytb
$ tox -e pypy310
.pkg: _optional_hooks> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: get_requires_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: prepare_metadata_for_build_wheel> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg: build_sdist> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
pypy310: install_package_deps> python -I -m pip install pytest
pypy310: install_package> python -I -m pip install --force-reinstall --no-deps /tmp/pure_eval/.tox/.tmp/package/2/pure_eval-0.2.3.dev2+gc6958c1.tar.gz
pypy310: commands[0]> pytest
========================================================= test session starts =========================================================
platform linux -- Python 3.10.13[pypy-7.3.13-final], pytest-7.4.3, pluggy-1.3.0
cachedir: .tox/pypy310/.pytest_cache
rootdir: /tmp/pure_eval
collected 47 items

tests/test_core.py ................. [ 36%]
tests/test_getattr_static.py ....F.................. [ 85%]
tests/test_utils.py ...F... [100%]

============================================================== FAILURES ===============================================================
______________________________________________ TestGetattrStatic.test_custom_object_dict ______________________________________________

self =

def test_custom_object_dict(self):
class Custom(dict):
def get(self, key, default=None):
return 1 / 0

__getitem__ = get

class Foo(object):
a = 3

foo = Foo()
foo.__dict__ = Custom()
foo.x = 5
> self.assert_getattr(foo, 'a')

tests/test_getattr_static.py:257:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_getattr_static.py:15: in assert_getattr
getattr(thing, attr),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = {'x': 5}, key = 'a', default = None

def get(self, key, default=None):
> return 1 / 0
E ZeroDivisionError: division by zero

tests/test_getattr_static.py:247: ZeroDivisionError
_______________________________________________________ test_safe_name_samples ________________________________________________________

def test_safe_name_samples():
for name, f in {**safe_name_samples, **typing_annotation_samples}.items():
> assert name == safe_name(f)
E AssertionError: assert '__mul__' == '__rmul__'
E - __rmul__
E ? -
E + __mul__

tests/test_utils.py:80: AssertionError
========================================================== warnings summary ===========================================================
tests/test_core.py::test_cannot_subscript[[1][:,:]]
:1: SyntaxWarning: list indices must be integers or slices, not tuple; perhaps you missed a comma?

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= short test summary info =======================================================
FAILED tests/test_getattr_static.py::TestGetattrStatic::test_custom_object_dict - ZeroDivisionError: division by zero
FAILED tests/test_utils.py::test_safe_name_samples - AssertionError: assert '__mul__' == '__rmul__'
=============================================== 2 failed, 45 passed, 1 warning in 3.60s ===============================================
pypy310: exit 1 (3.96 seconds) /tmp/pure_eval> pytest pid=424082
.pkg: _exit> python /usr/lib/python3.12/site-packages/pyproject_api/_backend.py True setuptools.build_meta
pypy310: FAIL code 1 (12.59=setup[8.63]+cmd[3.96] seconds)
evaluation failed :( (12.66 seconds)
```

CC @mattip, perhaps PyPy is doing something weird here.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.