kuznia-rdzeni / coreblocks

RISC-V out-of-order core for education and research purposes
https://kuznia-rdzeni.github.io/coreblocks/
BSD 3-Clause "New" or "Revised" License
33 stars 13 forks source link

pytest fixtures are executed multiple times #675

Closed xThaid closed 1 month ago

xThaid commented 2 months ago

Fixtures like configure_profiles and configure_logging from TestCaseWithSimulator are called for every test function in a test class. As a result, for example multiple logging handlers are added and logs are printed many times.

Kristopher38 commented 2 months ago

Solution: add scope="session" to fixture, see: https://docs.pytest.org/en/7.1.x/how-to/fixtures.html#scope-sharing-fixtures-across-classes-modules-packages-or-session