File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525def pytest_configure (config ):
2626 config .addinivalue_line ("markers" , "no_mock_full_hour: mark test to disable full_hour mocking." )
2727 config .addinivalue_line ("markers" , "no_mock_quarter_hour: mark test to disable quarter_hour mocking." )
28+ import sys
29+ sys ._called_from_test = True
30+
31+
32+ def pytest_unconfigure (config ):
33+ import sys
34+ del sys ._called_from_test
2835
2936
3037@pytest .fixture (autouse = True )
Original file line number Diff line number Diff line change 66import dataclass_utils
77from helpermodules .pub import Pub
88from modules .io_actions .groups import READABLE_GROUP_NAME , ActionGroup
9+ import sys
910log = logging .getLogger (__name__ )
1011
1112
@@ -165,8 +166,10 @@ def _pub_configurable_soc_modules() -> None:
165166 "text" : dev_defaults .name ,
166167 "defaults" : dataclass_utils .asdict (dev_defaults )
167168 })
168- except Exception :
169- log .exception ("Fehler im configuration-Modul" )
169+ except Exception as e :
170+ log .exception (f"Fehler { e } im configuration-Modul { path } " )
171+ if hasattr (sys , '_called_from_test' ):
172+ print (f"Fehler { e } im configuration-Modul { path } " )
170173 soc_modules = sorted (soc_modules , key = lambda d : d ['text' ].upper ())
171174 # "leeren" Eintrag an erster Stelle einfügen
172175 soc_modules .insert (0 ,
@@ -179,8 +182,10 @@ def _pub_configurable_soc_modules() -> None:
179182 }
180183 })
181184 Pub ().pub ("openWB/set/system/configurable/soc_modules" , soc_modules )
182- except Exception :
183- log .exception ("Fehler im configuration-Modul" )
185+ except Exception as e :
186+ log .exception (f"Fehler { e } im configuration-Modul { path } " )
187+ if hasattr (sys , '_called_from_test' ):
188+ print (f"Fehler { e } im configuration-Modul { path } " )
184189
185190
186191def _pub_configurable_devices_components () -> None :
You can’t perform that action at this time.
0 commit comments