Skip to content

Two test failures and one test error in 5.3.2 #1382

Closed
@musicinmybrain

Description

@musicinmybrain
$ 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   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions