(function from pyomo.common.flags)
pyomo.common.flags
Return True if we are currently running in a “testing” environment
This currently includes if nose, nose2, or pytest are running (imported).
nose
nose2
pytest
state (bool or None) – If provided, sets the current state of the testing environment (Setting to None reverts to the normal interrogation of sys.modules)
sys.modules
bool