NeuroTechX / moabb

Mother of All BCI Benchmarks
https://neurotechx.github.io/moabb/
BSD 3-Clause "New" or "Revised" License
646 stars 168 forks source link

Replace the unitest for pytest #617

Closed bruAristimunha closed 3 weeks ago

bruAristimunha commented 3 weeks ago

Here, we used the unitest program to make the test, as described in the CI:

poetry run -m unittest moabb.tests

This approach is acceptable, but it is a nightmare to track the wrong tests.

I propose to change to pytest approach, which is much simpler and more robust.

pytest moabb/tests

No test will be modified, but we must rename the file name to include the suffix test_.

tomMoral commented 3 weeks ago

you can configure pytest to match différent patterns for file name so possibly you can simply adapt without renaming all the files

Le ven. 7 juin 2024 à 16:14, Bru @.***> a écrit :

Here, we used the unitest program to make the test, as described in the CI:

poetry run -m unittest moabb.tests

This approach is acceptable, but it is a nightmare to track the wrong tests.

I propose to change to pytest approach, which is much simpler and more robust.

pytest moabb/tests

No test will be modified, but we must rename the file name to include the suffix test_.

— Reply to this email directly, view it on GitHub https://github.com/NeuroTechX/moabb/issues/617, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZKZ6NSHQU2SHY5CIHBCFTZGG53NAVCNFSM6AAAAABI6X7VZOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGM2DANJXGMYTANQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

bruAristimunha commented 3 weeks ago

Thanks for the comments @tomMoral! I am addressing this....

sylvchev commented 3 weeks ago

Yes, I agree that we should move away from unittest and use pytest for MOABB.