Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test suite failures #336

Closed
Apteryks opened this issue Dec 12, 2024 · 4 comments
Closed

test suite failures #336

Apteryks opened this issue Dec 12, 2024 · 4 comments

Comments

@Apteryks
Copy link

What I did:

Run the the test suite of the sdist distribution (version 7.2) via pytest -vv --import-mode=importlib

What I expect to happen:

All tests pass.

What actually happened:

=================================== FAILURES ===================================
______________________ LookupBaseTests.test_optimizations ______________________

self = <zope.interface.tests.test_adapter.LookupBaseTests testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <class 'zope.interface.adapter.LookupBase'>

src/zope/interface/tests/__init__.py:26: AssertionError
____________________ VerifyingBaseTests.test_optimizations _____________________

self = <zope.interface.tests.test_adapter.VerifyingBaseTests testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <class 'zope.interface.adapter.VerifyingBase'>

src/zope/interface/tests/__init__.py:26: AssertionError
____________________ Test_implementedBy.test_optimizations _____________________

self = <zope.interface.tests.test_declarations.Test_implementedBy testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <function implementedBy at 0x7ffff5e1a200>

src/zope/interface/tests/__init__.py:26: AssertionError
__________________ ClassProvidesBaseTests.test_optimizations ___________________

self = <zope.interface.tests.test_declarations.ClassProvidesBaseTests testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <class 'zope.interface.declarations.ClassProvidesBase'>

src/zope/interface/tests/__init__.py:26: AssertionError
________________ Test_getObjectSpecification.test_optimizations ________________

self = <zope.interface.tests.test_declarations.Test_getObjectSpecification testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <function getObjectSpecification at 0x7ffff5e1b1c0>

src/zope/interface/tests/__init__.py:26: AssertionError
______________________ Test_providedBy.test_optimizations ______________________

self = <zope.interface.tests.test_declarations.Test_providedBy testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <function providedBy at 0x7ffff5e1b250>

src/zope/interface/tests/__init__.py:26: AssertionError
____________ ObjectSpecificationDescriptorTests.test_optimizations _____________

self = <zope.interface.tests.test_declarations.ObjectSpecificationDescriptorTests testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <class 'zope.interface.declarations.ObjectSpecificationDescriptor'>

src/zope/interface/tests/__init__.py:26: AssertionError
__________________ SpecificationBaseTests.test_optimizations ___________________

self = <zope.interface.tests.test_interface.SpecificationBaseTests testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <class 'zope.interface.interface.SpecificationBase'>

src/zope/interface/tests/__init__.py:26: AssertionError
____________________ InterfaceBaseTests.test_optimizations _____________________

self = <zope.interface.tests.test_interface.InterfaceBaseTests testMethod=test_optimizations>

    def test_optimizations(self):
        used = self._getTargetClass()
        fallback = self._getFallbackClass()
    
        if _should_attempt_c_optimizations():
>           self.assertIsNot(used, fallback)
E           AssertionError: unexpectedly identical: <class 'zope.interface.interface.InterfaceBase'>

src/zope/interface/tests/__init__.py:26: AssertionError
=========================== short test summary info ============================
FAILED src/zope/interface/tests/test_adapter.py::LookupBaseTests::test_optimizations - AssertionError: unexpectedly identical: <class 'zope.interface.adapter.LookupBase'>
FAILED src/zope/interface/tests/test_adapter.py::VerifyingBaseTests::test_optimizations - AssertionError: unexpectedly identical: <class 'zope.interface.adapter.VerifyingBase'>
FAILED src/zope/interface/tests/test_declarations.py::Test_implementedBy::test_optimizations - AssertionError: unexpectedly identical: <function implementedBy at 0x7ffff5e1a200>
FAILED src/zope/interface/tests/test_declarations.py::ClassProvidesBaseTests::test_optimizations - AssertionError: unexpectedly identical: <class 'zope.interface.declarations.ClassProvidesBase'>
FAILED src/zope/interface/tests/test_declarations.py::Test_getObjectSpecification::test_optimizations - AssertionError: unexpectedly identical: <function getObjectSpecification at 0x7ffff5e1b1c0>
FAILED src/zope/interface/tests/test_declarations.py::Test_providedBy::test_optimizations - AssertionError: unexpectedly identical: <function providedBy at 0x7ffff5e1b250>
FAILED src/zope/interface/tests/test_declarations.py::ObjectSpecificationDescriptorTests::test_optimizations - AssertionError: unexpectedly identical: <class 'zope.interface.declarations.ObjectSpecificationDescriptor'>
FAILED src/zope/interface/tests/test_interface.py::SpecificationBaseTests::test_optimizations - AssertionError: unexpectedly identical: <class 'zope.interface.interface.SpecificationBase'>
FAILED src/zope/interface/tests/test_interface.py::InterfaceBaseTests::test_optimizations - AssertionError: unexpectedly identical: <class 'zope.interface.interface.InterfaceBase'>
================== 9 failed, 1357 passed, 7 skipped in 1.46s ===================
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "/gnu/store/b9v08npbsa9sqwdvnzzpmy1r7iqidxm4-python-pytest-8.3.3/bin/pytest" arguments: ("-vv" "--import-mode=importlib") exit-status: 1 term-signal: #f stop-signal: #f> 
phase `check' failed after 1.7 seconds

What version of Python and Zope/Addons I am using:

Guix System (GNU/Linux), Python 3.10.7, zope.interface 7.2

@Apteryks
Copy link
Author

@davisagli
Copy link
Member

This is to be expected, because these are tests for the optimizations provided by C extensions, which have not been built if you have not installed the sdist.

@davisagli davisagli closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2024
@d-maurer
Copy link
Contributor

d-maurer commented Dec 12, 2024 via email

@Apteryks
Copy link
Author

Thanks for the hints. We often avoid using tox in the minimal containerized build environment as it is redundant in such an already finely controlled environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants