using one RLock per Module + init generalConfig for all tests Change-Id: I88db6cacdb4aaac2ecd56644ccd6a3e5fd2d1cf2 Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/28005 Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de> Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
28 lines
453 B
Python
28 lines
453 B
Python
# content of conftest.py
|
|
|
|
import pytest
|
|
from secop.lib import generalConfig
|
|
|
|
|
|
@pytest.fixture(scope="session", autouse=True)
|
|
def general_config():
|
|
generalConfig.testinit()
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def constants():
|
|
# setup
|
|
class Constants:
|
|
ONE = 1
|
|
TWO = 2
|
|
c = Constants()
|
|
yield c
|
|
# teardown
|
|
del c
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
# pylint: disable=redefined-builtin
|
|
def globals():
|
|
return dict()
|