UBC-Thunderbots / Software

Robot Soccer Playing AI
http://www.ubcthunderbots.ca
GNU Lesser General Public License v3.0
53 stars 110 forks source link

Update all Pytests to use `pytest_main` #3232

Open nimazareian opened 3 months ago

nimazareian commented 3 months ago

Description of the task

All pytests should be unified to use pytest_main: https://github.com/UBC-Thunderbots/Software/blob/3266eb8bcad093d7a5ebd71cf0e1c3dbe924fd0b/src/software/simulated_tests/simulated_test_fixture.py#L499-L507

E.g. of correct usage https://github.com/UBC-Thunderbots/Software/blob/f869d6a541ae02a85e4a67904bd183debbba4b6b/src/software/ai/hl/stp/tactic/goalie/goalie_tactic_test.py#L263-L264

E.g. of a test that needs to be updated https://github.com/UBC-Thunderbots/Software/blob/35c1b3210bb13cb31b3114a9233fc219cb99c130/src/software/ai/hl/stp/play/enemy_free_kick/enemy_free_kick_play_test.py#L165-L167

This should allow us to unify how we run all of our pytests so arguments like test filter can always be used. Furthermore, arguments like -svv are necessary for being able to see logs/prints from our code.

Acceptance criteria