Pycharm pytest logging settings
Pytest logging in pycharm
In Pycharm running config, there are options to watch individual log files which is nice.
But the main bit - all my logging issues etc. were the fault of Pycharm’s Settings for pytest that added automatically a
-q flag. Removed that checkmark and now I get standard pytest output that I can modify!
def test_split_ds(caplog): caplog.set_level(logging.DEBUG, logger="anhaltai_bbk.data.train_dev_splitter.splitter") caplog.set_level(logging.DEBUG) # ...
Dropping into debugger on uncaught exception + pytest plugin
So, previously I thought about this here: 220214-1756 python run pdb on exception
Anyway, solution was on pytest level, installing this package was the only thing needed: pytest-pycharm · PyPI
Installed it at the same time as this pycharm plugin, might’ve been either of the two:
Anyway now life’s good: