Skip to content

Conversation

@mboisson
Copy link
Contributor

@mboisson mboisson commented Feb 21, 2023

While rebuilding a bunch of modules for python/3.11, pybind11 fails. This allows me to disable the tests.

The tests fail with

20562 ================================================================================================================================================================================= FAILURES                                                                                                                                                                                  =================================================================================================================================================================================
20563 _____________________________________________________________________________________________________________________________________________________________________________ test_properties                                                                                                                                                                               ______________________________________________________________________________________________________________________________________________________________________________
20564
20565     def test_properties():
20566         instance = m.TestProperties()
20567
20568         assert instance.def_readonly == 1
20569         with pytest.raises(AttributeError):
20570             instance.def_readonly = 2
20571
20572         instance.def_readwrite = 2
20573         assert instance.def_readwrite == 2
20574
20575         assert instance.def_property_readonly == 2
20576         with pytest.raises(AttributeError):
20577             instance.def_property_readonly = 3
20578
20579         instance.def_property = 3
20580         assert instance.def_property == 3
20581
20582         with pytest.raises(AttributeError) as excinfo:
20583             dummy = instance.def_property_writeonly  # unused var
20584 >       assert "unreadable attribute" in str(excinfo.value)
20585 E       assert 'unreadable attribute' in "property of 'TestProperties' object has no getter"
20586 E        +  where "property of 'TestProperties' object has no getter" = str(AttributeError("property of 'TestProperties' object has no getter"))
20587 E        +    where AttributeError("property of 'TestProperties' object has no getter") = <ExceptionInfo AttributeError("property of 'TestProperties' object has no getter") tblen=1>.value
20588
20589 ../../pybind11/pybind11-2.9.2/tests/test_methods_and_attributes.py:106: AssertionError
20590 __________________________________________________________________________________________________________________________________________________________________________ test_static_properties                                                                                                                                                                           __________________________________________________________________________________________________________________________________________________________________________
20591
20592     def test_static_properties():
20593         assert m.TestProperties.def_readonly_static == 1
20594         with pytest.raises(AttributeError) as excinfo:
20595             m.TestProperties.def_readonly_static = 2
20596 >       assert "can't set attribute" in str(excinfo.value)
20597 E       assert "can't set attribute" in "property of 'pybind11_type' object has no setter"
20598 E        +  where "property of 'pybind11_type' object has no setter" = str(AttributeError("property of 'pybind11_type' object has no setter"))
20599 E        +    where AttributeError("property of 'pybind11_type' object has no setter") = <ExceptionInfo AttributeError("property of 'pybind11_type' object has no setter") tblen=1>.value
20600
20601 ../../pybind11/pybind11-2.9.2/tests/test_methods_and_attributes.py:124: AssertionError
20602 ========================================================================================================================================================================= short test summary info                                                                                                                                                                           ==========================================================================================================================================================================

@jfgrimm jfgrimm added this to the 4.x milestone Feb 21, 2023
Copy link
Member

@jfgrimm jfgrimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jfgrimm
Copy link
Member

jfgrimm commented Feb 21, 2023

Test report by @jfgrimm

Overview of tested easyconfigs (in order)

  • SUCCESS pybind11-2.9.2-GCCcore-11.3.0.eb
  • SUCCESS pybind11-2.7.1-GCCcore-11.2.0.eb
  • SUCCESS pybind11-2.6.2-GCCcore-10.3.0.eb
  • SUCCESS pybind11-2.6.0-GCCcore-10.2.0.eb

Build succeeded for 4 out of 4 (4 easyconfigs in total)
himem05.pri.viking.alces.network - Linux CentOS Linux 7.9.2009, x86_64, Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz (cascadelake), Python 3.6.8
See https://gist.github.com/c3edbbfa40cf3fbcc8ebd0de60dcb862 for a full test report.

@jfgrimm jfgrimm modified the milestones: 4.x, next release (4.7.1?) Feb 21, 2023
@jfgrimm
Copy link
Member

jfgrimm commented Feb 21, 2023

Going in, thanks @mboisson!

@jfgrimm jfgrimm merged commit 7d43202 into easybuilders:develop Feb 21, 2023
@boegel boegel changed the title allow disabling pybind11 tests allow disabling pybind11 tests with 'runtest = False' Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants