Bug 2274501 - python-marshmallow-enum fails to build with pytest 8: AttributeError: 'TestEnumFieldByName' object has no attribute 'field'
Summary: python-marshmallow-enum fails to build with pytest 8: AttributeError: 'TestEn...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-marshmallow-enum
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fabian Affolter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2256331
TreeView+ depends on / blocked
 
Reported: 2024-04-11 12:26 UTC by Tomáš Hrnčiar
Modified: 2025-01-31 16:39 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-01-31 16:39:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hrnčiar 2024-04-11 12:26:57 UTC
python-marshmallow-enum fails to build with pytest 8.

=================================== FAILURES ===================================
___________________ TestEnumFieldByName.test_serialize_enum ____________________

self = <test_enum_field.TestEnumFieldByName object at 0x7f4a62cd2f90>

    def test_serialize_enum(self):
>       assert self.field._serialize(EnumTester.one, None, object()) == 'one'
E       AttributeError: 'TestEnumFieldByName' object has no attribute 'field'

tests/test_enum_field.py:34: AttributeError
___________________ TestEnumFieldByName.test_serialize_none ____________________

self = <test_enum_field.TestEnumFieldByName object at 0x7f4a62cd3080>

    def test_serialize_none(self):
>       assert self.field._serialize(None, None, object()) is None
E       AttributeError: 'TestEnumFieldByName' object has no attribute 'field'

tests/test_enum_field.py:37: AttributeError
__________________ TestEnumFieldByName.test_deserialize_enum ___________________

self = <test_enum_field.TestEnumFieldByName object at 0x7f4a62cd31a0>

    def test_deserialize_enum(self):
>       assert self.field._deserialize('one', None, {}) == EnumTester.one
E       AttributeError: 'TestEnumFieldByName' object has no attribute 'field'

tests/test_enum_field.py:40: AttributeError
__________________ TestEnumFieldByName.test_deserialize_none ___________________

self = <test_enum_field.TestEnumFieldByName object at 0x7f4a62cd32c0>

    def test_deserialize_none(self):
>       assert self.field._deserialize(None, None, {}) is None
E       AttributeError: 'TestEnumFieldByName' object has no attribute 'field'

tests/test_enum_field.py:43: AttributeError
___________ TestEnumFieldByName.test_deserialize_nonexistent_member ____________

self = <test_enum_field.TestEnumFieldByName object at 0x7f4a62cd33e0>

    def test_deserialize_nonexistent_member(self):
        with pytest.raises(ValidationError):
>           self.field._deserialize('fred', None, {})
E           AttributeError: 'TestEnumFieldByName' object has no attribute 'field'

tests/test_enum_field.py:47: AttributeError
=========================== short test summary info ============================
FAILED tests/test_enum_field.py::TestEnumFieldByName::test_serialize_enum - A...
FAILED tests/test_enum_field.py::TestEnumFieldByName::test_serialize_none - A...
FAILED tests/test_enum_field.py::TestEnumFieldByName::test_deserialize_enum
FAILED tests/test_enum_field.py::TestEnumFieldByName::test_deserialize_none
FAILED tests/test_enum_field.py::TestEnumFieldByName::test_deserialize_nonexistent_member
================== 5 failed, 36 passed, 12 warnings in 0.09s ===================

https://docs.pytest.org/en/stable/changelog.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/thrnciar/pytest/fedora-rawhide-x86_64/07248352-python-marshmallow-enum/

For all our attempts to build python-marshmallow-enum with pytest 8, see:
https://copr.fedorainfracloud.org/coprs/thrnciar/pytest/package/python-marshmallow-enum/

Let us know here if you have any questions.

Pytest 8 is planned to be included in Fedora 41. And this bugzilla is a
heads up before we merge new pytest into rawhide. For more info see a Fedora Change
proposal https://fedoraproject.org/wiki/Changes/Pytest_8

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.


Note You need to log in before you can comment on or make changes to this bug.