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

1 test fails: AssertionError: assert ['second', 'first'] == ['first', 'second'] #1375

Open
yurivict opened this issue Oct 10, 2024 · 1 comment

Comments

@yurivict
Copy link

========================================================================================== ERRORS ===========================================================================================
______________________________________________________________________ ERROR at teardown of TestRunAllTests.test_first ______________________________________________________________________

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 ['second', 'first'] == ['first', 'second']
E         
E         At index 0 diff: 'second' != 'first'
E         
E         Full diff:
E           [
E         +     'second',
E               'first',
E         -     'second',
E           ]

nibabel/tests/test_api_validators.py:116: AssertionError
========================================================================================= FAILURES ==========================================================================================
__________________________________________________________________________________ TestEcatImage.test_file __________________________________________________________________________________

self = <nibabel.tests.test_ecat.TestEcatImage testMethod=test_file>

    def test_file(self):
>       assert Path(self.img.file_map['header'].filename) == Path(self.example_file)
E       AssertionError: assert PosixPath('tinypet_tmp.v') == PosixPath('/usr/ports/science/py-nibabel/work-py311/nibabel-5.3.0/nibabel/tests/data/tinypet.v')
E        +  where PosixPath('tinypet_tmp.v') = Path('tinypet_tmp.v')
E        +    where 'tinypet_tmp.v' = <nibabel.fileholders.FileHolder object at 0x3d17265d0650>.filename
E        +  and   PosixPath('/usr/ports/science/py-nibabel/work-py311/nibabel-5.3.0/nibabel/tests/data/tinypet.v') = Path('/usr/ports/science/py-nibabel/work-py311/nibabel-5.3.0/nibabel/tests/data/tinypet.v')
E        +    where '/usr/ports/science/py-nibabel/work-py311/nibabel-5.3.0/nibabel/tests/data/tinypet.v' = <nibabel.tests.test_ecat.TestEcatImage testMethod=test_file>.example_file

nibabel/tests/test_ecat.py:186: AssertionError

Version: 5.3.0
Python-3.11
FreeBSD 14.1

@effigies
Copy link
Member

The first looks like a race condition for a test suite written before parallelizing tests. Should be straightforward. The second is a bit weirder... Will have a look tomorrow.

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