Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 07:47:27

0001 import warnings
0002 import acts
0003 
0004 try:
0005     if acts.logging.getFailureThreshold() != acts.logging.WARNING:
0006         acts.logging.setFailureThreshold(acts.logging.WARNING)
0007 except RuntimeError:
0008     # Repackage with different error string
0009     errtype = (
0010         "negative"
0011         if acts.logging.getFailureThreshold() < acts.logging.WARNING
0012         else "positive"
0013     )
0014     warnings.warn(
0015         "Runtime log failure threshold could not be set. "
0016         "Compile-time value is probably set via CMake, i.e. "
0017         f"`ACTS_LOG_FAILURE_THRESHOLD={acts.logging.getFailureThreshold().name}` is set, "
0018         "or `ACTS_ENABLE_LOG_FAILURE_THRESHOLD=OFF`. "
0019         f"The pytest test-suite can produce false-{errtype} results in this configuration"
0020     )