Skip to content

Two test failures and one test error in 5.3.2 #1382

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

Closed
musicinmybrain opened this issue Oct 25, 2024 · 1 comment
Closed

Two test failures and one test error in 5.3.2 #1382

musicinmybrain opened this issue Oct 25, 2024 · 1 comment

Comments

@musicinmybrain
Copy link
Contributor

$ gh repo clone nipy/nibabel
$ cd nibabel
$ git checkout 5.3.2
$ python3.12 -m venv _e
$ . _e/bin/activate
(_e) $ pip install -e .[test]
(_e) $ pytest --doctest-modules --doctest-plus -v --pyargs nibabel
[…]
=========================================================================================== short test summary info ============================================================================================
FAILED nibabel/tests/test_api_validators.py::TestRunAllTests::test_first - AttributeError: 'dict' object has no attribute 'add'
FAILED nibabel/tests/test_api_validators.py::TestRunAllTests::test_second - AttributeError: 'dict' object has no attribute 'add'
ERROR nibabel/tests/test_api_validators.py::TestRunAllTests::test_second - AssertionError: assert {} == {'first', 'second'}
==================================================== 2 failed, 5275 passed, 305 skipped, 40 xfailed, 4 xpassed, 27003 warnings, 1 error in 67.24s (0:01:07) ====================================================

Detailed output:

==================================================================================================== ERRORS ====================================================================================================
_______________________________________________________________________________ ERROR at teardown of TestRunAllTests.test_second _______________________________________________________________________________

cls = <class 'nibabel.tests.test_api_validators.TestRunAllTests'>

    @classmethod
    def teardown_class(cls):
        # Check that both validate_xxx tests got run
>       assert cls.run_tests == {'first', 'second'}
E       AssertionError: assert {} == {'first', 'second'}
E         
E         Full diff:
E         + {}
E         - {
E         -     'first',
E         -     'second',
E         - }

nibabel/tests/test_api_validators.py:116: AssertionError   
=================================================================================================== FAILURES ===================================================================================================
__________________________________________________________________________________________ TestRunAllTests.test_first __________________________________________________________________________________________

self = <nibabel.tests.test_api_validators.TestRunAllTests object at 0x7f9886f7cfe0>

    def meth(self):
        for imaker, params in self.obj_params():
>           validator(self, imaker, params)

nibabel/tests/test_api_validators.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nibabel.tests.test_api_validators.TestRunAllTests object at 0x7f9886f7cfe0>, obj = 1, param = 2

    def validate_first(self, obj, param):
>       self.run_tests.add('first')
E       AttributeError: 'dict' object has no attribute 'add'

nibabel/tests/test_api_validators.py:108: AttributeError   
_________________________________________________________________________________________ TestRunAllTests.test_second __________________________________________________________________________________________

self = <nibabel.tests.test_api_validators.TestRunAllTests object at 0x7f9886f7d1c0>

    def meth(self):
        for imaker, params in self.obj_params():
>           validator(self, imaker, params)

nibabel/tests/test_api_validators.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <nibabel.tests.test_api_validators.TestRunAllTests object at 0x7f9886f7d1c0>, obj = 1, param = 2

    def validate_second(self, obj, param):
>       self.run_tests.add('second')
E       AttributeError: 'dict' object has no attribute 'add'

nibabel/tests/test_api_validators.py:111: AttributeError   
@effigies
Copy link
Member

Ah, damn, that should be a set(). I am surprised that it didn't fail our tests...

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

2 participants